mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: gregkh@suse.de
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] sysfs: fix sysfs_setattr
Date: Tue, 12 Jul 2005 17:59:09 +0530	[thread overview]
Message-ID: <20050712122908.GC5971@in.ibm.com> (raw)
In-Reply-To: <20050712122813.GB5971@in.ibm.com>




o sysfs_dirent's s_mode field should also be updated in sysfs_setattr(), else
  there could be inconsistency in the two fields. s_mode is used while
  ->readdir so as not to bring in the inode to cache.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
---

 linux-2.6.13-rc2-maneesh/fs/sysfs/inode.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/sysfs/inode.c~fix-sysfs_setattr-update-s_mode fs/sysfs/inode.c
--- linux-2.6.13-rc2/fs/sysfs/inode.c~fix-sysfs_setattr-update-s_mode	2005-07-12 11:24:56.341493928 +0530
+++ linux-2.6.13-rc2-maneesh/fs/sysfs/inode.c	2005-07-12 11:24:56.347493016 +0530
@@ -85,7 +85,7 @@ int sysfs_setattr(struct dentry * dentry
 
 		if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
 			mode &= ~S_ISGID;
-		sd_iattr->ia_mode = mode;
+		sd_iattr->ia_mode = sd->s_mode = mode;
 	}
 
 	return error;
_
-- 
Maneesh Soni
Linux Technology Center, 
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990

      reply	other threads:[~2005-07-12 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12 12:28 [PATCH 1/2] sysfs: fix sysfs_chmod_file Maneesh Soni
2005-07-12 12:29 ` Maneesh Soni [this message]

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=20050712122908.GC5971@in.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®