From: Al Viro Date: Sat, 15 May 2010 08:02:54 +0000 (-0400) Subject: logfs: replace inode uid,gid,mode initialization with helper function X-Git-Tag: v2.6.35-rc1~432^2~7 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=ab9a79b9669c28734a69fa9384df6fb93152e53a;p=net-next-2.6.git logfs: replace inode uid,gid,mode initialization with helper function Signed-off-by: Al Viro --- diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index 755a92e8daa..f602e230e16 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c @@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode) inode->i_mode = mode; logfs_set_ino_generation(sb, inode); - inode->i_uid = current_fsuid(); - inode->i_gid = current_fsgid(); - if (dir->i_mode & S_ISGID) { - inode->i_gid = dir->i_gid; - if (S_ISDIR(mode)) - inode->i_mode |= S_ISGID; - } - + inode_init_owner(inode, dir, mode); logfs_inode_setops(inode); insert_inode_hash(inode);