aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 485a6aa0ad39..f95f3654ee68 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -421,13 +421,13 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
421 fe->i_blkno = cpu_to_le64(fe_blkno); 421 fe->i_blkno = cpu_to_le64(fe_blkno);
422 fe->i_suballoc_bit = cpu_to_le16(suballoc_bit); 422 fe->i_suballoc_bit = cpu_to_le16(suballoc_bit);
423 fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot); 423 fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot);
424 fe->i_uid = cpu_to_le32(current->fsuid); 424 fe->i_uid = cpu_to_le32(current_fsuid());
425 if (dir->i_mode & S_ISGID) { 425 if (dir->i_mode & S_ISGID) {
426 fe->i_gid = cpu_to_le32(dir->i_gid); 426 fe->i_gid = cpu_to_le32(dir->i_gid);
427 if (S_ISDIR(mode)) 427 if (S_ISDIR(mode))
428 mode |= S_ISGID; 428 mode |= S_ISGID;
429 } else 429 } else
430 fe->i_gid = cpu_to_le32(current->fsgid); 430 fe->i_gid = cpu_to_le32(current_fsgid());
431 fe->i_mode = cpu_to_le16(mode); 431 fe->i_mode = cpu_to_le16(mode);
432 if (S_ISCHR(mode) || S_ISBLK(mode)) 432 if (S_ISCHR(mode) || S_ISBLK(mode))
433 fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev)); 433 fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev));