aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-02-28 20:34:07 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:41 -0500
commitbf9c1387ca80deac792c9ecf1c64dfcc5d1cc768 (patch)
tree4a06245d796db913a2a137d6498149e047a84283 /fs/nfs
parent6f78befc417dd7122249706b49520da29ba58451 (diff)
NFSv4.1: put_layout_hdr can remove nfsi->layout
Prevents an Oops triggered by CB_LAYOUTRECALL and LAYOUTGET race on a pnfs_layout_hdr first pnfs_layout_segment. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 0f5b66f90d17..7d031cd7d920 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -768,7 +768,7 @@ pnfs_update_layout(struct inode *ino,
768 put_layout_hdr(lo); 768 put_layout_hdr(lo);
769out: 769out:
770 dprintk("%s end, state 0x%lx lseg %p\n", __func__, 770 dprintk("%s end, state 0x%lx lseg %p\n", __func__,
771 nfsi->layout->plh_flags, lseg); 771 nfsi->layout ? nfsi->layout->plh_flags : -1, lseg);
772 return lseg; 772 return lseg;
773out_unlock: 773out_unlock:
774 spin_unlock(&ino->i_lock); 774 spin_unlock(&ino->i_lock);