patch-2.1.61 linux/fs/smbfs/cache.c
Next file: linux/fs/smbfs/dir.c
Previous file: linux/fs/nls/nls_base.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Thu Oct 30 11:03:53 1997
- Orig file:
v2.1.60/linux/fs/smbfs/cache.c
- Orig date:
Wed Oct 15 16:04:23 1997
diff -u --recursive --new-file v2.1.60/linux/fs/smbfs/cache.c linux/fs/smbfs/cache.c
@@ -130,13 +130,14 @@
* entries are coming in order and are added to the end.
*/
void
-smb_add_to_cache(struct cache_head * cachep, struct dirent *entry, off_t fpos)
+smb_add_to_cache(struct cache_head * cachep, struct cache_dirent *entry,
+ off_t fpos)
{
struct inode * inode = get_cache_inode(cachep);
struct cache_index * index;
struct cache_block * block;
unsigned long page_off;
- unsigned int nent, offset, len = entry->d_reclen;
+ unsigned int nent, offset, len = entry->len;
unsigned int needed = len + sizeof(struct cache_entry);
#ifdef SMBFS_DEBUG_VERBOSE
@@ -163,10 +164,10 @@
offset = index->space +
index->num_entries * sizeof(struct cache_entry);
block = index->block;
- memcpy(&block->cb_data.names[offset], entry->d_name, len);
+ memcpy(&block->cb_data.names[offset], entry->name, len);
block->cb_data.table[nent].namelen = len;
block->cb_data.table[nent].offset = offset;
- block->cb_data.table[nent].ino = entry->d_ino;
+ block->cb_data.table[nent].ino = entry->ino;
cachep->entries++;
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_add_to_cache: added entry %s, len=%d, pos=%ld, entries=%d\n",
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]