[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181222034111.15214-1-yangerkun@huawei.com>
Date: Sat, 22 Dec 2018 11:41:11 +0800
From: yangerkun <yangerkun@...wei.com>
To: <gregkh@...uxfoundation.org>, <rafael@...nel.org>
CC: <yangerkun@...wei.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] debugfs: remove no need inc_nlink
Remove inc_nlink in debugfs_create_automount, or this inode will never
be free.
Signed-off-by: yangerkun <yangerkun@...wei.com>
---
fs/debugfs/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 13b0135..9e6e225 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -516,8 +516,6 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
- /* directory inodes start off with i_nlink == 2 (for "." entry) */
- inc_nlink(inode);
d_instantiate(dentry, inode);
inc_nlink(d_inode(dentry->d_parent));
fsnotify_mkdir(d_inode(dentry->d_parent), dentry);
--
2.9.5
Powered by blists - more mailing lists