Message ID | 1458157316-7562-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 8ffc4b9..ddb1dc9 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -595,7 +595,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;