summaryrefslogtreecommitdiffstats
path: root/efivarfs-nlink-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'efivarfs-nlink-fix.patch')
-rw-r--r--efivarfs-nlink-fix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/efivarfs-nlink-fix.patch b/efivarfs-nlink-fix.patch
new file mode 100644
index 000000000..421658678
--- /dev/null
+++ b/efivarfs-nlink-fix.patch
@@ -0,0 +1,24 @@
+efivarfs_unlink() should drop the file's link count, not the directory's.
+
+Tested-by: Lee, Chun-Yi <jlee@suse.com>
+Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
+---
+ drivers/firmware/efivars.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
+index d6b8d2f..60f5324 100644
+--- a/drivers/firmware/efivars.c
++++ b/drivers/firmware/efivars.c
+@@ -995,7 +995,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;
+ }
+--
+1.7.7.6
+