]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ovl: allow statfs if no upper layer
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 12 Dec 2014 23:59:46 +0000 (00:59 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Fri, 12 Dec 2014 23:59:46 +0000 (00:59 +0100)
Handle "no upper layer" case in statfs.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/overlayfs/super.c

index 110c968dcb3b045b953478a3d773708bf595ccc3..cc7a0f3aa0dd0c04b41e82eebb2c97adac7ca825 100644 (file)
@@ -484,7 +484,7 @@ static void ovl_put_super(struct super_block *sb)
  * @buf: The struct kstatfs to fill in with stats
  *
  * Get the filesystem statistics.  As writes always target the upper layer
- * filesystem pass the statfs to the same filesystem.
+ * filesystem pass the statfs to the upper filesystem (if it exists)
  */
 static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
@@ -493,7 +493,7 @@ static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
        struct path path;
        int err;
 
-       ovl_path_upper(root_dentry, &path);
+       ovl_path_real(root_dentry, &path);
 
        err = vfs_statfs(&path, buf);
        if (!err) {