mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
[PATCH] NFS: __nfs_revalidate_inode() can use "inode" before checking it is non-NULL
The "!inode" check in __nfs_revalidate_inode() occurs well after the first time it is dereferenced, so get rid of it. Coverity: #cid 1372, 1373 Test plan: Code review; recheck with Coverity. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
39cf8a1374
commit
85233a7a43
@ -583,7 +583,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
|
||||
|
||||
nfs_inc_stats(inode, NFSIOS_INODEREVALIDATE);
|
||||
lock_kernel();
|
||||
if (!inode || is_bad_inode(inode))
|
||||
if (is_bad_inode(inode))
|
||||
goto out_nowait;
|
||||
if (NFS_STALE(inode))
|
||||
goto out_nowait;
|
||||
|
Loading…
Reference in New Issue
Block a user