From patchwork Wed Aug 18 06:01:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsh Prateek Bora X-Patchwork-Id: 120070 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7I62RmT017008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 18 Aug 2010 06:03:08 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Olbj7-00031N-SQ; Wed, 18 Aug 2010 06:02:17 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Olbj7-00031D-1H for v9fs-developer@lists.sourceforge.net; Wed, 18 Aug 2010 06:02:17 +0000 X-ACL-Warn: Received: from e23smtp07.au.ibm.com ([202.81.31.140]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Olbj4-0006eL-D7 for v9fs-developer@lists.sourceforge.net; Wed, 18 Aug 2010 06:02:17 +0000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id o7I621Cp004796 for ; Wed, 18 Aug 2010 16:02:01 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o7I621to1089634 for ; Wed, 18 Aug 2010 16:02:01 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o7I621On012556 for ; Wed, 18 Aug 2010 16:02:01 +1000 Received: from harshbora.in.ibm.com ([9.124.35.112]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o7I61xKi012503; Wed, 18 Aug 2010 16:01:59 +1000 From: Harsh Prateek Bora To: v9fs-developer@lists.sourceforge.net Date: Wed, 18 Aug 2010 11:31:52 +0530 Message-Id: <1282111312-15741-1-git-send-email-harsh@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1.1 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Olbj4-0006eL-D7 Subject: [V9fs-developer] [PATCH] fs/9p: mkdir fix for setting S_ISGID bit as per parent directory X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 18 Aug 2010 06:03:08 +0000 (UTC) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index abeb4f0..571204b 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -887,6 +887,8 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, struct dentry *dentry, v9ses = v9fs_inode2v9ses(dir); mode |= S_IFDIR; + if (dir->i_mode & S_ISGID) + mode |= S_ISGID; dir_dentry = v9fs_dentry_from_dir_inode(dir); dfid = v9fs_fid_lookup(dir_dentry); if (IS_ERR(dfid)) {