Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b10b8520 authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Al Viro
Browse files

ext4: replace inode uid,gid,mode init with helper

parent aab99c2c
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -979,16 +979,12 @@ got:
		atomic_dec(&sbi->s_flex_groups[flex_group].free_inodes);
	}

	if (test_opt(sb, GRPID)) {
		inode->i_mode = mode;
		inode->i_uid = current_fsuid();
	if (test_opt(sb, GRPID))
		inode->i_gid = dir->i_gid;
	else if (dir->i_mode & S_ISGID) {
		inode->i_gid = dir->i_gid;
		if (S_ISDIR(mode))
			mode |= S_ISGID;
	} else
		inode->i_gid = current_fsgid();
	inode->i_mode = mode;
		inode_init_owner(inode, dir, mode);

	inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);
	/* This is the optimal IO size (for stat), not the fs block size */