File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 16
16
#include <linux/namei.h>
17
17
#include <linux/seq_file.h>
18
18
#include <linux/exportfs.h>
19
+ #include <linux/uuid.h>
20
+ #include <linux/statfs.h>
19
21
20
22
#include "kernfs-internal.h"
21
23
@@ -45,8 +47,15 @@ static int kernfs_sop_show_path(struct seq_file *sf, struct dentry *dentry)
45
47
return 0 ;
46
48
}
47
49
50
+ static int kernfs_statfs (struct dentry * dentry , struct kstatfs * buf )
51
+ {
52
+ simple_statfs (dentry , buf );
53
+ buf -> f_fsid = uuid_to_fsid (dentry -> d_sb -> s_uuid .b );
54
+ return 0 ;
55
+ }
56
+
48
57
const struct super_operations kernfs_sops = {
49
- .statfs = simple_statfs ,
58
+ .statfs = kernfs_statfs ,
50
59
.drop_inode = generic_delete_inode ,
51
60
.evict_inode = kernfs_evict_inode ,
52
61
@@ -351,6 +360,8 @@ int kernfs_get_tree(struct fs_context *fc)
351
360
}
352
361
sb -> s_flags |= SB_ACTIVE ;
353
362
363
+ uuid_gen (& sb -> s_uuid );
364
+
354
365
down_write (& root -> kernfs_supers_rwsem );
355
366
list_add (& info -> node , & info -> root -> supers );
356
367
up_write (& root -> kernfs_supers_rwsem );
You can’t perform that action at this time.
0 commit comments