[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / sparc64 / solaris / fs.c
index d7c99fa..0f0eb6a 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
+#include <linux/capability.h>
 #include <linux/fs.h>
 #include <linux/namei.h>
 #include <linux/mm.h>
@@ -355,7 +356,7 @@ static int report_statvfs(struct vfsmount *mnt, struct inode *inode, u32 buf)
        int error;
        struct sol_statvfs __user *ss = A(buf);
 
-       error = vfs_statfs(mnt->mnt_sb, &s);
+       error = vfs_statfs(mnt->mnt_root, &s);
        if (!error) {
                const char *p = mnt->mnt_sb->s_type->name;
                int i = 0;
@@ -391,7 +392,7 @@ static int report_statvfs64(struct vfsmount *mnt, struct inode *inode, u32 buf)
        int error;
        struct sol_statvfs64 __user *ss = A(buf);
                        
-       error = vfs_statfs(mnt->mnt_sb, &s);
+       error = vfs_statfs(mnt->mnt_root, &s);
        if (!error) {
                const char *p = mnt->mnt_sb->s_type->name;
                int i = 0;