Skip to content

Commit ecf0eb9

Browse files
zeldovichTrond Myklebust
authored andcommitted
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]
1 parent 360e1a5 commit ecf0eb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/callback_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
206206

207207
list_for_each_entry(lo, &server->layouts, plh_layouts) {
208208
ino = igrab(lo->plh_inode);
209-
if (ino)
209+
if (!ino)
210210
continue;
211211
spin_lock(&ino->i_lock);
212212
/* Is this layout in the process of being freed? */

0 commit comments

Comments
 (0)