[PATCH] NFS: Fix Oopsable/unnecessary i_count manipulations in nfs_wait_on_inode()
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Mon, 17 Oct 2005 10:03:23 +0000 (06:03 -0400)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 17 Oct 2005 21:47:16 +0000 (14:47 -0700)
Oopsable since nfs_wait_on_inode() can get called as part of iput_final().

Unnecessary since the caller had better be damned sure that the inode won't
disappear from underneath it anyway.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfs/inode.c

index 6be46d21c01e9d2fe8d33de116fbe6e9cbedaf4b..d4eadeea128e94f738c013eabe1bc69167645092 100644 (file)
@@ -877,12 +877,10 @@ static int nfs_wait_on_inode(struct inode *inode)
        sigset_t oldmask;
        int error;
 
-       atomic_inc(&inode->i_count);
        rpc_clnt_sigmask(clnt, &oldmask);
        error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
                                        nfs_wait_schedule, TASK_INTERRUPTIBLE);
        rpc_clnt_sigunmask(clnt, &oldmask);
-       iput(inode);
 
        return error;
 }