2 #include <linux/export.h>
12 static int flags_by_mnt(
int mnt_flags)
33 static int flags_by_sb(
int s_flags)
43 static int calculate_f_flags(
struct vfsmount *mnt)
46 flags_by_sb(mnt->
mnt_sb->s_flags);
53 if (!dentry->
d_sb->s_op->statfs)
56 memset(buf, 0,
sizeof(*buf));
60 retval = dentry->
d_sb->s_op->statfs(dentry, buf);
61 if (retval == 0 && buf->
f_frsize == 0)
70 error = statfs_by_dentry(path->
dentry, buf);
90 struct fd f = fdget(fd);
103 if (
sizeof(buf) ==
sizeof(*st))
104 memcpy(&buf, st,
sizeof(*st));
109 0xffffffff00000000ULL)
116 (st->
f_files & 0xffffffff00000000ULL))
119 (st->
f_ffree & 0xffffffff00000000ULL))
144 if (
sizeof(buf) ==
sizeof(*st))
145 memcpy(&buf, st,
sizeof(*st));
170 error = do_statfs_native(&st, buf);
178 if (sz !=
sizeof(*buf))
182 error = do_statfs64(&st, buf);
191 error = do_statfs_native(&st, buf);
200 if (sz !=
sizeof(*buf))
205 error = do_statfs64(&st, buf);
216 err = statfs_by_dentry(s->
s_root, sbuf);