summaryrefslogtreecommitdiff
path: root/fs/overlayfs/copy_up.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-21 14:09:18 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-21 14:09:18 +0300
commita2ab5fc41533c952706ebdfaa378bb746e535cc1 (patch)
tree9fb86bb4e9ecb67f7e651d284c2f12c6c5d4378f /fs/overlayfs/copy_up.c
parenta380f2edef65b2447a043251bb3c00a9d2153a8b (diff)
parent0e708fc602531b8355b5de6ea7c98f09129b223f (diff)
downloadlinux-a2ab5fc41533c952706ebdfaa378bb746e535cc1.tar.xz
Merge branch 'pm-sleep' into pm-core
Diffstat (limited to 'fs/overlayfs/copy_up.c')
-rw-r--r--fs/overlayfs/copy_up.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index aad97b30d5e6..c441f9387a1b 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -561,10 +561,8 @@ static int ovl_do_copy_up(struct ovl_copy_up_ctx *c)
c->tmpfile = true;
err = ovl_copy_up_locked(c);
} else {
- err = -EIO;
- if (lock_rename(c->workdir, c->destdir) != NULL) {
- pr_err("overlayfs: failed to lock workdir+upperdir\n");
- } else {
+ err = ovl_lock_rename_workdir(c->workdir, c->destdir);
+ if (!err) {
err = ovl_copy_up_locked(c);
unlock_rename(c->workdir, c->destdir);
}