diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-09-25 16:39:55 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-10-05 15:53:18 +0200 |
commit | 5820dc0888d302ac05f8b91ffdf7e4e53b4fbf53 (patch) | |
tree | e22ae933b338fe9a51f34cef6658d82484aaff91 /fs/overlayfs/overlayfs.h | |
parent | dc7ab6773e8171e07f16fd0df0c5eea28c899503 (diff) | |
download | op-kernel-dev-5820dc0888d302ac05f8b91ffdf7e4e53b4fbf53.zip op-kernel-dev-5820dc0888d302ac05f8b91ffdf7e4e53b4fbf53.tar.gz |
ovl: fix missing unlock_rename() in ovl_do_copy_up()
Use the ovl_lock_rename_workdir() helper which requires
unlock_rename() only on lock success.
Fixes: ("fd210b7d67ee ovl: move copy up lock out")
Cc: <stable@vger.kernel.org> # v4.13
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index d4e8c1a..c706a6f 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -235,6 +235,7 @@ bool ovl_inuse_trylock(struct dentry *dentry); void ovl_inuse_unlock(struct dentry *dentry); int ovl_nlink_start(struct dentry *dentry, bool *locked); void ovl_nlink_end(struct dentry *dentry, bool locked); +int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *upperdir); static inline bool ovl_is_impuredir(struct dentry *dentry) { |