summaryrefslogtreecommitdiff
path: root/include/linux/statfs.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-09-18 23:45:50 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2020-09-18 23:45:50 +0300
commit6d1349c769ea28543bdde20a658cbc93c3bc936d (patch)
treeb35159c21b17c48fdec6b5349a7b69682b882076 /include/linux/statfs.h
parentaabf59432c51be174994ecfe280f75ac139b5550 (diff)
downloadlinux-6d1349c769ea28543bdde20a658cbc93c3bc936d.tar.xz
[PATCH] reduce boilerplate in fsid handling
Get rid of boilerplate in most of ->statfs() instances... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/statfs.h')
-rw-r--r--include/linux/statfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/statfs.h b/include/linux/statfs.h
index fac4356ea1bf..20f695b90aab 100644
--- a/include/linux/statfs.h
+++ b/include/linux/statfs.h
@@ -45,4 +45,9 @@ struct kstatfs {
struct dentry;
extern int vfs_get_fsid(struct dentry *dentry, __kernel_fsid_t *fsid);
+static inline __kernel_fsid_t u64_to_fsid(u64 v)
+{
+ return (__kernel_fsid_t){.val = {(u32)v, (u32)(v>>32)}};
+}
+
#endif