mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:20:49 +07:00
[PATCH] NFS: Fix Oopsable/unnecessary i_count manipulations in nfs_wait_on_inode()
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>
This commit is contained in:
parent
b3c52da33c
commit
6ce969171d
@ -877,12 +877,10 @@ static int nfs_wait_on_inode(struct inode *inode)
|
|||||||
sigset_t oldmask;
|
sigset_t oldmask;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
atomic_inc(&inode->i_count);
|
|
||||||
rpc_clnt_sigmask(clnt, &oldmask);
|
rpc_clnt_sigmask(clnt, &oldmask);
|
||||||
error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
|
error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
|
||||||
nfs_wait_schedule, TASK_INTERRUPTIBLE);
|
nfs_wait_schedule, TASK_INTERRUPTIBLE);
|
||||||
rpc_clnt_sigunmask(clnt, &oldmask);
|
rpc_clnt_sigunmask(clnt, &oldmask);
|
||||||
iput(inode);
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user