aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-20 20:15:57 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:11 -0400
commit7fdab069b7172f2348cf3d87e19c6c24340292bf (patch)
tree487de5c39bb8be13be52091acc83139435943000 /fs/nfs/pnfs.h
parent115ce575cb10918514d053ef15f597a4e6ff60e9 (diff)
NFSv4.1: Fix a race in the pNFS return-on-close code
If we sleep after dropping the inode->i_lock, then we are no longer atomic with respect to the rpc_wake_up() call in pnfs_layout_remove_lseg(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 9735031e1e1a..aa9fa1b1ff4a 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -210,7 +210,7 @@ int pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
210bool pnfs_roc(struct inode *ino); 210bool pnfs_roc(struct inode *ino);
211void pnfs_roc_release(struct inode *ino); 211void pnfs_roc_release(struct inode *ino);
212void pnfs_roc_set_barrier(struct inode *ino, u32 barrier); 212void pnfs_roc_set_barrier(struct inode *ino, u32 barrier);
213bool pnfs_roc_drain(struct inode *ino, u32 *barrier); 213bool pnfs_roc_drain(struct inode *ino, u32 *barrier, struct rpc_task *task);
214void pnfs_set_layoutcommit(struct nfs_write_data *wdata); 214void pnfs_set_layoutcommit(struct nfs_write_data *wdata);
215void pnfs_cleanup_layoutcommit(struct nfs4_layoutcommit_data *data); 215void pnfs_cleanup_layoutcommit(struct nfs4_layoutcommit_data *data);
216int pnfs_layoutcommit_inode(struct inode *inode, bool sync); 216int pnfs_layoutcommit_inode(struct inode *inode, bool sync);
@@ -442,7 +442,7 @@ pnfs_roc_set_barrier(struct inode *ino, u32 barrier)
442} 442}
443 443
444static inline bool 444static inline bool
445pnfs_roc_drain(struct inode *ino, u32 *barrier) 445pnfs_roc_drain(struct inode *ino, u32 *barrier, struct rpc_task *task)
446{ 446{
447 return false; 447 return false;
448} 448}