Message ID | 1458084361-20961-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 692ceda..36d6a5b 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -618,7 +618,8 @@ static int ovl_remove_upper(struct dentry *dentry, bool is_dir) * sole user of this dentry. Too tricky... Just unhash for * now. */ - d_drop(dentry); + if (!err) + d_drop(dentry); mutex_unlock(&dir->i_mutex); return err;