]> Pileus Git - ~andy/linux/blobdiff - fs/nfsd/vfs.h
Merge tag 'vfio-v3.9-rc7' of git://github.com/awilliam/linux-vfio
[~andy/linux] / fs / nfsd / vfs.h
index 359594c393d273f20b5fe3ef0a9a75379ab1edc2..5b5894159f22a5261ccd0c5f4a583cdfe0325dec 100644 (file)
@@ -6,6 +6,7 @@
 #define LINUX_NFSD_VFS_H
 
 #include "nfsfh.h"
+#include "nfsd.h"
 
 /*
  * Flags for nfsd_permission
@@ -125,4 +126,11 @@ static inline void fh_drop_write(struct svc_fh *fh)
        }
 }
 
+static inline __be32 fh_getattr(struct svc_fh *fh, struct kstat *stat)
+{
+       struct path p = {.mnt = fh->fh_export->ex_path.mnt,
+                        .dentry = fh->fh_dentry};
+       return nfserrno(vfs_getattr(&p, stat));
+}
+
 #endif /* LINUX_NFSD_VFS_H */