aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd/nfsfh.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfsd/nfsfh.h')
-rw-r--r--include/linux/nfsd/nfsfh.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 31a3cb617ce0..069257ea99a0 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -290,8 +290,9 @@ fill_post_wcc(struct svc_fh *fhp)
290 * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once 290 * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once
291 * so, any changes here should be reflected there. 291 * so, any changes here should be reflected there.
292 */ 292 */
293
293static inline void 294static inline void
294fh_lock(struct svc_fh *fhp) 295fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
295{ 296{
296 struct dentry *dentry = fhp->fh_dentry; 297 struct dentry *dentry = fhp->fh_dentry;
297 struct inode *inode; 298 struct inode *inode;
@@ -310,11 +311,17 @@ fh_lock(struct svc_fh *fhp)
310 } 311 }
311 312
312 inode = dentry->d_inode; 313 inode = dentry->d_inode;
313 mutex_lock(&inode->i_mutex); 314 mutex_lock_nested(&inode->i_mutex, subclass);
314 fill_pre_wcc(fhp); 315 fill_pre_wcc(fhp);
315 fhp->fh_locked = 1; 316 fhp->fh_locked = 1;
316} 317}
317 318
319static inline void
320fh_lock(struct svc_fh *fhp)
321{
322 fh_lock_nested(fhp, I_MUTEX_NORMAL);
323}
324
318/* 325/*
319 * Unlock a file handle/inode 326 * Unlock a file handle/inode
320 */ 327 */