From d97b8a0bff7d7792ad846cc87245b2b13dfbbd6b Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 24 Sep 2010 03:10:09 -0400 Subject: [PATCH] Unionfs: pass valid vfsmount to vfs_statfs Signed-off-by: Erez Zadok --- fs/unionfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index 1bd49f5fd0ba..b8cabeccdb28 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -144,8 +144,9 @@ static int unionfs_statfs(struct dentry *dentry, struct kstatfs *buf) lower_dentry = unionfs_lower_dentry(sb->s_root); lower_path.dentry = lower_dentry; - lower_path.mnt = NULL; + lower_path.mnt = unionfs_mntget(sb->s_root, 0); err = vfs_statfs(&lower_path, buf); + mntput(lower_path.mnt); /* set return buf to our f/s to avoid confusing user-level utils */ buf->f_type = UNIONFS_SUPER_MAGIC; -- 2.34.1