Browse files

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]
  • Loading branch information...
1 parent 360e1a5 commit ecf0eb9edbb607d74f74b73c14af8b43f3729528 @zeldovich zeldovich committed with Trond Myklebust Jan 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 fs/nfs/callback_proc.c
View
2 fs/nfs/callback_proc.c
@@ -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? */

0 comments on commit ecf0eb9

Please sign in to comment.