nfs: avoid dereferencing null pointer in initiate_bulk_draining

Fix an inverted null pointer check in initiate_bulk_draining().

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>= 3.7]
This commit is contained in:
Nickolai Zeldovich 2013-01-05 14:19:51 -05:00 committed by Trond Myklebust
parent 360e1a5349
commit ecf0eb9edb

View File

@ -206,7 +206,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
list_for_each_entry(lo, &server->layouts, plh_layouts) {
ino = igrab(lo->plh_inode);
if (ino)
if (!ino)
continue;
spin_lock(&ino->i_lock);
/* Is this layout in the process of being freed? */