提交 de5fe955 编写于 作者: L Lingzhu Xiang 提交者: 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: NLingzhu Xiang <lxiang@redhat.com>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Tested-by: NLee, Chun-Yi <jlee@suse.com>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 7d1f9aef
......@@ -994,7 +994,7 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
list_del(&var->list);
spin_unlock(&efivars->lock);
efivar_unregister(var);
drop_nlink(dir);
drop_nlink(dentry->d_inode);
dput(dentry);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册