summaryrefslogtreecommitdiff
path: root/fs/nfsd/vfs.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-23 21:03:18 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-04 07:52:35 +0400
commitbad0dcffc21d17a07dbb83a2bf764f35a57feba5 (patch)
treebb2ed8685bafc927df70307ba13df53469000255 /fs/nfsd/vfs.h
parenta561be7100cd610bd2e082f3211c1dfb45835817 (diff)
downloadlinux-bad0dcffc21d17a07dbb83a2bf764f35a57feba5.tar.xz
new helpers: fh_{want,drop}_write()
A bunch of places in nfsd does mnt_{want,drop}_write on vfsmount of export of given fhandle. Switched to obvious inlined helpers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r--fs/nfsd/vfs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index 3f54ad03bb2b..cee6a12296e8 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -106,4 +106,14 @@ struct posix_acl *nfsd_get_posix_acl(struct svc_fh *, int);
int nfsd_set_posix_acl(struct svc_fh *, int, struct posix_acl *);
#endif
+static inline int fh_want_write(struct svc_fh *fh)
+{
+ return mnt_want_write(fh->fh_export->ex_path.mnt);
+}
+
+static inline void fh_drop_write(struct svc_fh *fh)
+{
+ mnt_drop_write(fh->fh_export->ex_path.mnt);
+}
+
#endif /* LINUX_NFSD_VFS_H */