mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
vfs: add vfs_get_fsid() helper
Wrapper around statfs() interface. Cc: Al Viro <[email protected]> Signed-off-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
77115225ac
commit
ec86ff5689
2 changed files with 17 additions and 0 deletions
14
fs/statfs.c
14
fs/statfs.c
|
|
@ -67,6 +67,20 @@ static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
|
|||
return retval;
|
||||
}
|
||||
|
||||
int vfs_get_fsid(struct dentry *dentry, __kernel_fsid_t *fsid)
|
||||
{
|
||||
struct kstatfs st;
|
||||
int error;
|
||||
|
||||
error = statfs_by_dentry(dentry, &st);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
*fsid = st.f_fsid;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(vfs_get_fsid);
|
||||
|
||||
int vfs_statfs(const struct path *path, struct kstatfs *buf)
|
||||
{
|
||||
int error;
|
||||
|
|
|
|||
Loading…
Reference in a new issue