]> err.no Git - linux-2.6/commitdiff
[PATCH] nfsd4: lookup_one_len takes i_sem
authorNeilBrown <neilb@cse.unsw.edu.au>
Fri, 8 Jul 2005 00:59:12 +0000 (17:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:24:07 +0000 (18:24 -0700)
Oops, this lookup_one_len needs the i_sem.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfs4recover.c

index bb40083b6b7d77af0779beccf961a382b1e71ca9..53abb333732eeac7f53d33705de7fd70367a1902 100644 (file)
@@ -289,7 +289,9 @@ nfsd4_unlink_clid_dir(char *name, int namlen)
 
        dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name);
 
+       down(&rec_dir.dentry->d_inode->i_sem);
        dentry = lookup_one_len(name, rec_dir.dentry, namlen);
+       up(&rec_dir.dentry->d_inode->i_sem);
        if (IS_ERR(dentry)) {
                status = PTR_ERR(dentry);
                return status;