summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndy Adamson2011-03-01 02:34:07 +0100
committerTrond Myklebust2011-03-11 21:38:41 +0100
commitbf9c1387ca80deac792c9ecf1c64dfcc5d1cc768 (patch)
tree4a06245d796db913a2a137d6498149e047a84283 /fs/nfs
parentNFSv4: remove CONFIG_NFS_V4 from nfs_read_data (diff)
downloadkernel-qcow2-linux-bf9c1387ca80deac792c9ecf1c64dfcc5d1cc768.tar.gz
kernel-qcow2-linux-bf9c1387ca80deac792c9ecf1c64dfcc5d1cc768.tar.xz
kernel-qcow2-linux-bf9c1387ca80deac792c9ecf1c64dfcc5d1cc768.zip
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,
put_layout_hdr(lo);
out:
dprintk("%s end, state 0x%lx lseg %p\n", __func__,
- nfsi->layout->plh_flags, lseg);
+ nfsi->layout ? nfsi->layout->plh_flags : -1, lseg);
return lseg;
out_unlock:
spin_unlock(&ino->i_lock);