From patchwork Wed Feb 17 18:36:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 80004 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1HIbDlF010757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Feb 2010 18:37:49 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 1Nholn-0006mD-JX; Wed, 17 Feb 2010 18:37:07 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nholm-0006m1-Hy for v9fs-developer@lists.sourceforge.net; Wed, 17 Feb 2010 18:37:06 +0000 Received-SPF: pass (sfi-mx-3.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.220.216 as permitted sender) client-ip=209.85.220.216; envelope-from=rjevskiy@gmail.com; helo=mail-fx0-f216.google.com; Received: from mail-fx0-f216.google.com ([209.85.220.216]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nholk-0001mN-2q for v9fs-developer@lists.sourceforge.net; Wed, 17 Feb 2010 18:37:06 +0000 Received: by fxm8 with SMTP id 8so7794151fxm.6 for ; Wed, 17 Feb 2010 10:36:57 -0800 (PST) Received: by 10.87.56.18 with SMTP id i18mr14957772fgk.44.1266431817534; Wed, 17 Feb 2010 10:36:57 -0800 (PST) Received: from localhost.localdomain (swsoft-msk-nat.sw.ru [195.214.232.10]) by mx.google.com with ESMTPS id 3sm13867406fge.11.2010.02.17.10.36.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Feb 2010 10:36:56 -0800 (PST) From: Dmitry Monakhov To: linux-fsdevel@vger.kernel.org Date: Wed, 17 Feb 2010 21:36:53 +0300 Message-Id: <1266431813-8919-1-git-send-email-dmonakhov@openvz.org> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1266431353-8549-1-git-send-email-dmonakhov@openvz.org> References: <1266431353-8549-1-git-send-email-dmonakhov@openvz.org> X-Spam-Score: -2.5 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature -1.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nholk-0001mN-2q Cc: v9fs-developer@lists.sourceforge.net, Dmitry Monakhov Subject: [V9fs-developer] [PATCH 02/19] 9p: replace inode uid, gid, mode initialization with helper function 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, 17 Feb 2010 18:37:49 +0000 (UTC) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 9d03d1e..037b67e 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -252,9 +252,7 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode) return ERR_PTR(-ENOMEM); } - inode->i_mode = mode; - inode->i_uid = current_fsuid(); - inode->i_gid = current_fsgid(); + inode_init_owner(inode, NULL, mode); inode->i_blocks = 0; inode->i_rdev = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;