[PATCH 02/15] sysfs: fix comments of sysfs_add/remove_one()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Thursday, September 20, 2007 - 12:05 am

sysfs_add/remove_one() now link and unlink the target dirent into and
from the children list.  Update comments accordingly.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 fs/sysfs/dir.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index da4bb66..e85206c 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -410,10 +410,8 @@ void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
  *	@sd: sysfs_dirent to be added
  *
  *	Get @acxt->parent_sd and set sd->s_parent to it and increment
- *	nlink of parent inode if @sd is a directory.  @sd is NOT
- *	linked into the children list of the parent.  The caller
- *	should invoke sysfs_link_sibling() after this function
- *	completes if @sd needs to be on the children list.
+ *	nlink of parent inode if @sd is a directory and link into the
+ *	children list of the parent.
  *
  *	This function should be called between calls to
  *	sysfs_addrm_start() and sysfs_addrm_finish() and should be
@@ -449,9 +447,7 @@ int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
  *	@sd: sysfs_dirent to be added
  *
  *	Mark @sd removed and drop nlink of parent inode if @sd is a
- *	directory.  @sd is NOT unlinked from the children list of the
- *	parent.  The caller is repsonsible for removing @sd from the
- *	children list before calling this function.
+ *	directory.  @sd is unlinked from the children list.
  *
  *	This function should be called between calls to
  *	sysfs_addrm_start() and sysfs_addrm_finish() and should be
-- 
1.5.0.3


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 01/15] sysfs: kill SYSFS_FLAG_REMOVED, Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 02/15] sysfs: fix comments of sysfs_add/remove_one(), Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCHSET 1/4] sysfs: misc updates, Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 05/15] sysfs: kill sysfs_update_file(), Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 04/15] sysfs: clean up header files, Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 11/15] sysfs: open code sysfs_attach_dentry(), Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 10/15] sysfs: make s_elem an anonymous union, Tejun Heo, (Thu Sep 20, 12:05 am)
[PATCH 14/15] sysfs: implement sysfs_open_dirent, Tejun Heo, (Thu Sep 20, 12:05 am)
Re: [PATCH 01/15] sysfs: kill SYSFS_FLAG_REMOVED, Greg KH, (Tue Sep 25, 2:32 pm)
Re: [PATCHSET 1/4] sysfs: misc updates, Cornelia Huck, (Wed Sep 26, 4:04 am)
Re: [PATCHSET 1/4] sysfs: misc updates, Greg KH, (Wed Sep 26, 8:19 am)