]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-linux-hash-inodes-for-mmap-20071127
authorMarc Dionne <marc.dionne@technoconseil.com>
Tue, 27 Nov 2007 19:28:26 +0000 (19:28 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 27 Nov 2007 19:28:26 +0000 (19:28 +0000)
FIXES 78544

inodes are only added to the superblock dirty list if hashed.

do so.

(cherry picked from commit 89261e8b84697f3b5158e197ca9946c6fe9f45ed)

src/afs/LINUX/osi_vnodeops.c

index a14f58374094d9ab460bf46c10f492a90f8af576..674b857c266264fe2a061bcc4ab579ce7898f332 100644 (file)
@@ -970,6 +970,7 @@ afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
 
        afs_getattr(vcp, &vattr, credp);
        afs_fill_inode(ip, &vattr);
+       insert_inode_hash(ip);
        dp->d_op = &afs_dentry_operations;
        dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
        d_instantiate(dp, ip);
@@ -1018,6 +1019,8 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp)
        ip = AFSTOV(vcp);
        afs_getattr(vcp, &vattr, credp);
        afs_fill_inode(ip, &vattr);
+       if (hlist_unhashed(&ip->i_hash))
+           insert_inode_hash(ip);
     }
     dp->d_op = &afs_dentry_operations;
     dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
@@ -1880,5 +1883,4 @@ afs_fill_inode(struct inode *ip, struct vattr *vattr)
 #endif
     }
 
-    /* insert_inode_hash(ip);  -- this would make iget() work (if we used it) */
 }