+ nfs-__nfs_revalidate_inode-can-use-inode-before.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     NFS: __nfs_revalidate_inode() can use "inode" before 	checking it is non-NULL

has been added to the -mm tree.  Its filename is

     nfs-__nfs_revalidate_inode-can-use-inode-before.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: NFS: __nfs_revalidate_inode() can use "inode" before 	checking it is non-NULL
From: Chuck Lever <chuck.lever@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfs/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/nfs/inode.c~nfs-__nfs_revalidate_inode-can-use-inode-before fs/nfs/inode.c
--- a/fs/nfs/inode.c~nfs-__nfs_revalidate_inode-can-use-inode-before
+++ a/fs/nfs/inode.c
@@ -583,7 +583,7 @@ __nfs_revalidate_inode(struct nfs_server
 
 	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;
_

Patches currently in -mm which might be from chuck.lever@xxxxxxxxxx are

origin.patch
nfs-fix-minor-bug-in-new-nfs-symlink-code.patch
nfs-__nfs_revalidate_inode-can-use-inode-before.patch
nfs-remove-unused-check-in-nfs4_open_revalidate.patch
sunrpc-fix-race-in-in-kernel-rpc-portmapper-client.patch
sunrpc-fix-a-typo.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux