nfsfh.h (cc80fe0eefbbbd7b4e32f631bb2fa639d76af075) | nfsfh.h (5955102c9984fa081b2d570cfac75c97eecf8f3b) |
---|---|
1/* 2 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> 3 * 4 * This file describes the layout of the file handles as passed 5 * over the wire. 6 */ 7#ifndef _LINUX_NFSD_NFSFH_H 8#define _LINUX_NFSD_NFSFH_H --- 274 unchanged lines hidden (view full) --- 283 284 if (fhp->fh_locked) { 285 printk(KERN_WARNING "fh_lock: %pd2 already locked!\n", 286 dentry); 287 return; 288 } 289 290 inode = d_inode(dentry); | 1/* 2 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> 3 * 4 * This file describes the layout of the file handles as passed 5 * over the wire. 6 */ 7#ifndef _LINUX_NFSD_NFSFH_H 8#define _LINUX_NFSD_NFSFH_H --- 274 unchanged lines hidden (view full) --- 283 284 if (fhp->fh_locked) { 285 printk(KERN_WARNING "fh_lock: %pd2 already locked!\n", 286 dentry); 287 return; 288 } 289 290 inode = d_inode(dentry); |
291 mutex_lock_nested(&inode->i_mutex, subclass); | 291 inode_lock_nested(inode, subclass); |
292 fill_pre_wcc(fhp); 293 fhp->fh_locked = true; 294} 295 296static inline void 297fh_lock(struct svc_fh *fhp) 298{ 299 fh_lock_nested(fhp, I_MUTEX_NORMAL); 300} 301 302/* 303 * Unlock a file handle/inode 304 */ 305static inline void 306fh_unlock(struct svc_fh *fhp) 307{ 308 if (fhp->fh_locked) { 309 fill_post_wcc(fhp); | 292 fill_pre_wcc(fhp); 293 fhp->fh_locked = true; 294} 295 296static inline void 297fh_lock(struct svc_fh *fhp) 298{ 299 fh_lock_nested(fhp, I_MUTEX_NORMAL); 300} 301 302/* 303 * Unlock a file handle/inode 304 */ 305static inline void 306fh_unlock(struct svc_fh *fhp) 307{ 308 if (fhp->fh_locked) { 309 fill_post_wcc(fhp); |
310 mutex_unlock(&d_inode(fhp->fh_dentry)->i_mutex); | 310 inode_unlock(d_inode(fhp->fh_dentry)); |
311 fhp->fh_locked = false; 312 } 313} 314 315#endif /* _LINUX_NFSD_NFSFH_H */ | 311 fhp->fh_locked = false; 312 } 313} 314 315#endif /* _LINUX_NFSD_NFSFH_H */ |