Commit de5fe955 authored by Lingzhu Xiang's avatar Lingzhu Xiang Committed by Matt Fleming

efivarfs: Drop link count of the right inode

efivarfs_unlink() should drop the file's link count, not the directory's.
Signed-off-by: default avatarLingzhu Xiang <lxiang@redhat.com>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Tested-by: default avatarLee, Chun-Yi <jlee@suse.com>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 7d1f9aef
...@@ -994,7 +994,7 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry) ...@@ -994,7 +994,7 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
list_del(&var->list); list_del(&var->list);
spin_unlock(&efivars->lock); spin_unlock(&efivars->lock);
efivar_unregister(var); efivar_unregister(var);
drop_nlink(dir); drop_nlink(dentry->d_inode);
dput(dentry); dput(dentry);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment