Skip to content

Commit

Permalink
ovl: allow statfs if no upper layer
Browse files Browse the repository at this point in the history
Handle "no upper layer" case in statfs.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Miklos Szeredi committed Dec 12, 2014
1 parent 09e1032 commit 4ebc581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/overlayfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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) {
Expand Down

0 comments on commit 4ebc581

Please sign in to comment.