X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fkernfs%2Fmount.c;h=0f4152defe7b6f96afa752acdbc075a512bc8c5d;hb=9f8b483cf34d1492fdabf9b03ab3f9c74c242554;hp=0d6ce895a9eec0ce3b3329d1353b594d353aeacb;hpb=167eeb470057adb5e9a22281d2852edc91c70473;p=~andy%2Flinux diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 0d6ce895a9e..0f4152defe7 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -94,6 +94,7 @@ const void *kernfs_super_ns(struct super_block *sb) * @fs_type: file_system_type of the fs being mounted * @flags: mount flags specified for the mount * @root: kernfs_root of the hierarchy being mounted + * @new_sb_created: tell the caller if we allocated a new superblock * @ns: optional namespace tag of the mount * * This is to be called from each kernfs user's file_system_type->mount() @@ -104,7 +105,8 @@ const void *kernfs_super_ns(struct super_block *sb) * The return value can be passed to the vfs layer verbatim. */ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, - struct kernfs_root *root, const void *ns) + struct kernfs_root *root, bool *new_sb_created, + const void *ns) { struct super_block *sb; struct kernfs_super_info *info; @@ -122,6 +124,10 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, kfree(info); if (IS_ERR(sb)) return ERR_CAST(sb); + + if (new_sb_created) + *new_sb_created = !sb->s_root; + if (!sb->s_root) { error = kernfs_fill_super(sb); if (error) {