All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugfs: remove no need inc_nlink
@ 2018-12-22  3:41 yangerkun
  2018-12-22  7:32 ` Greg KH
  2018-12-23  1:32   ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: yangerkun @ 2018-12-22  3:41 UTC (permalink / raw)
  To: gregkh, rafael; +Cc: yangerkun, linux-kernel

Remove inc_nlink in debugfs_create_automount, or this inode will never
be free.

Signed-off-by: yangerkun <yangerkun@huawei.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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-23  1:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22  3:41 [PATCH] debugfs: remove no need inc_nlink yangerkun
2018-12-22  7:32 ` Greg KH
2018-12-22  8:43   ` yangerkun
2018-12-23  1:32 ` [debugfs] a1e6b3dc1c: WARNING:at_fs/inode.c:#drop_nlink kernel test robot
2018-12-23  1:32   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.