Unionfs: pass valid vfsmount to vfs_statfs
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 24 Sep 2010 07:10:09 +0000 (03:10 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:39:22 +0000 (22:39 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/super.c

index 1bd49f5fd0ba21c2ee870486de2f9a6c705b97f8..b8cabeccdb2873cf8625a99025452a6eea972de6 100644 (file)
@@ -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;