aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index ccb33289c29a..9e1090b8dd3b 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -407,9 +407,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
407 ip = DLMFS_I(inode); 407 ip = DLMFS_I(inode);
408 408
409 inode->i_ino = get_next_ino(); 409 inode->i_ino = get_next_ino();
410 inode->i_mode = mode; 410 inode_init_owner(inode, NULL, mode);
411 inode->i_uid = current_fsuid();
412 inode->i_gid = current_fsgid();
413 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; 411 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
414 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 412 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
415 inc_nlink(inode); 413 inc_nlink(inode);
@@ -433,9 +431,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
433 return NULL; 431 return NULL;
434 432
435 inode->i_ino = get_next_ino(); 433 inode->i_ino = get_next_ino();
436 inode->i_mode = mode; 434 inode_init_owner(inode, parent, mode);
437 inode->i_uid = current_fsuid();
438 inode->i_gid = current_fsgid();
439 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; 435 inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
440 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 436 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
441 437
@@ -472,13 +468,6 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
472 inc_nlink(inode); 468 inc_nlink(inode);
473 break; 469 break;
474 } 470 }
475
476 if (parent->i_mode & S_ISGID) {
477 inode->i_gid = parent->i_gid;
478 if (S_ISDIR(mode))
479 inode->i_mode |= S_ISGID;
480 }
481
482 return inode; 471 return inode;
483} 472}
484 473