aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 17:32:19 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:26 -0400
commit04b7ed0d33eee161b223d64f16e1f521a84ace76 (patch)
treea01bef0d4329c017f370e1e4ed09f9d965587a5a /fs/reiserfs
parent454abafe9d8beb3fe7da06131b3d81d6d352a959 (diff)
downloadkernel_samsung_aries-04b7ed0d33eee161b223d64f16e1f521a84ace76.zip
kernel_samsung_aries-04b7ed0d33eee161b223d64f16e1f521a84ace76.tar.gz
kernel_samsung_aries-04b7ed0d33eee161b223d64f16e1f521a84ace76.tar.bz2
reiserfs: replace inode uid,gid,mode initialization with helper function
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/namei.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index d0c43cb..ee78d4a 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -561,23 +561,13 @@ static int drop_new_inode(struct inode *inode)
*/
static int new_inode_init(struct inode *inode, struct inode *dir, int mode)
{
-
- /* the quota init calls have to know who to charge the quota to, so
- ** we have to set uid and gid here
- */
- inode->i_uid = current_fsuid();
- inode->i_mode = mode;
/* Make inode invalid - just in case we are going to drop it before
* the initialization happens */
INODE_PKEY(inode)->k_objectid = 0;
-
- if (dir->i_mode & S_ISGID) {
- inode->i_gid = dir->i_gid;
- if (S_ISDIR(mode))
- inode->i_mode |= S_ISGID;
- } else {
- inode->i_gid = current_fsgid();
- }
+ /* the quota init calls have to know who to charge the quota to, so
+ ** we have to set uid and gid here
+ */
+ inode_init_owner(inode, dir, mode);
dquot_initialize(inode);
return 0;
}