From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH 17/19] ubifs: replace inode uid,gid,mode initialization with helper function Date: Thu, 18 Feb 2010 12:54:54 +0200 Message-ID: <1266490494.16891.17.camel@localhost> References: <1266431353-8549-1-git-send-email-dmonakhov@openvz.org> <1266432380-9951-1-git-send-email-dmonakhov@openvz.org> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org To: Dmitry Monakhov Return-path: Received: from smtp.nokia.com ([192.100.122.233]:17109 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757182Ab0BRK5M (ORCPT ); Thu, 18 Feb 2010 05:57:12 -0500 In-Reply-To: <1266432380-9951-1-git-send-email-dmonakhov@openvz.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2010-02-17 at 21:46 +0300, Dmitry Monakhov wrote: > Signed-off-by: Dmitry Monakhov Acked-by: Artem Bityutskiy > --- > fs/ubifs/dir.c | 9 +-------- > 1 files changed, 1 insertions(+), 8 deletions(-) >=20 > diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c > index 552fb01..5a357bf 100644 > --- a/fs/ubifs/dir.c > +++ b/fs/ubifs/dir.c > @@ -104,14 +104,7 @@ struct inode *ubifs_new_inode(struct ubifs_info = *c, const struct inode *dir, > */ > inode->i_flags |=3D (S_NOCMTIME); > =20 > - inode->i_uid =3D current_fsuid(); > - if (dir->i_mode & S_ISGID) { > - inode->i_gid =3D dir->i_gid; > - if (S_ISDIR(mode)) > - mode |=3D S_ISGID; > - } else > - inode->i_gid =3D current_fsgid(); > - inode->i_mode =3D mode; > + inode_init_owner(inode, dir, mode); > inode->i_mtime =3D inode->i_atime =3D inode->i_ctime =3D > ubifs_current_time(inode); > inode->i_mapping->nrpages =3D 0; --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html