public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: ebiederm@xmission.com, cornelia.huck@de.ibm.com, greg@kroah.com,
	stern@rowland.harvard.edu, kay.sievers@vrfy.org,
	linux-kernel@vger.kernel.org, htejun@gmail.com
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 02/15] sysfs: fix comments of sysfs_add/remove_one()
Date: Thu, 20 Sep 2007 16:05:09 +0900	[thread overview]
Message-ID: <1190271909482-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11902719091692-git-send-email-htejun@gmail.com>

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



  reply	other threads:[~2007-09-20  7:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-20  7:05 [PATCHSET 1/4] sysfs: misc updates Tejun Heo
2007-09-20  7:05 ` Tejun Heo [this message]
2007-09-20  7:05 ` [PATCH 01/15] sysfs: kill SYSFS_FLAG_REMOVED Tejun Heo
2007-09-25 21:32   ` Greg KH
2007-09-20  7:05 ` [PATCH 03/15] sysfs: fix sysfs_chmod_file() such that it updates sd->s_mode too Tejun Heo
2007-09-20  7:05 ` [PATCH 09/15] sysfs: make bin attr open get active reference of parent too Tejun Heo
2007-09-20  7:05 ` [PATCH 04/15] sysfs: clean up header files Tejun Heo
2007-09-20  7:05 ` [PATCH 06/15] sysfs: reposition sysfs_dirent->s_mode Tejun Heo
2007-09-20  7:05 ` [PATCH 07/15] sysfs: kill unnecessary sysfs_get() in open paths Tejun Heo
2007-09-20  7:05 ` [PATCH 08/15] sysfs: kill unnecessary NULL pointer check in sysfs_release() Tejun Heo
2007-09-20  7:05 ` [PATCH 05/15] sysfs: kill sysfs_update_file() Tejun Heo
2007-09-20  7:05 ` [PATCH 10/15] sysfs: make s_elem an anonymous union Tejun Heo
2007-09-20  7:05 ` [PATCH 11/15] sysfs: open code sysfs_attach_dentry() Tejun Heo
2007-09-20  7:05 ` [PATCH 14/15] sysfs: implement sysfs_open_dirent Tejun Heo
2007-09-20  7:05 ` [PATCH 12/15] sysfs: make sysfs_root a regular directory dirent Tejun Heo
2007-09-20  7:05 ` [PATCH 15/15] sysfs: move sysfs file poll implementation to sysfs_open_dirent Tejun Heo
2007-09-20  7:05 ` [PATCH 13/15] sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir Tejun Heo
2007-09-26 11:04 ` [PATCHSET 1/4] sysfs: misc updates Cornelia Huck
2007-09-26 15:19   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1190271909482-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox