]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ubifs/dir.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[karo-tx-linux.git] / fs / ubifs / dir.c
index 552fb0111fff0354cab51be0b3fcc5ca11b0c6a0..87ebcce72213e2889f66127125908190a4ef213d 100644 (file)
@@ -104,14 +104,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
         */
        inode->i_flags |= (S_NOCMTIME);
 
-       inode->i_uid = current_fsuid();
-       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_mtime = inode->i_atime = inode->i_ctime =
                         ubifs_current_time(inode);
        inode->i_mapping->nrpages = 0;
@@ -1120,7 +1113,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
        if (release)
                ubifs_release_budget(c, &ino_req);
        if (IS_SYNC(old_inode))
-               err = old_inode->i_sb->s_op->write_inode(old_inode, 1);
+               err = old_inode->i_sb->s_op->write_inode(old_inode, NULL);
        return err;
 
 out_cancel: