diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2017-11-09 10:23:28 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-11-09 10:23:28 +0100 |
commit | 8aafcb593d25e81c13be49310550e80d8788b995 (patch) | |
tree | e8b5380835fad20c74bcc152fcb7bd043c52acfd /fs/overlayfs/super.c | |
parent | f121aadede37bcbb77ea552d195a09c734486fe7 (diff) |
ovl: use path_put_init() in error paths for ovl_fill_super()
This allows simplifying the error cleanup later.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 2c9f48096ff0..bc8729491362 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -586,7 +586,7 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path) return 0; out_put: - path_put(path); + path_put_init(path); out: return err; } @@ -604,7 +604,7 @@ static int ovl_mount_dir(const char *name, struct path *path) if (ovl_dentry_remote(path->dentry)) { pr_err("overlayfs: filesystem on '%s' not supported as upperdir\n", tmp); - path_put(path); + path_put_init(path); err = -EINVAL; } kfree(tmp); @@ -656,7 +656,7 @@ static int ovl_lower_dir(const char *name, struct path *path, return 0; out_put: - path_put(path); + path_put_init(path); out: return err; } |