fs: port privilege checking helpers to mnt_idmap
[linux-block.git] / fs / ocfs2 / file.c
index 7acc89f47a5a1ca7e7841e5a0e3aa85ef64e859c..805a95e35f4c123305f33ecd0467704a768d954c 100644 (file)
@@ -1992,7 +1992,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
                }
        }
 
-       if (file && setattr_should_drop_suidgid(&init_user_ns, file_inode(file))) {
+       if (file && setattr_should_drop_suidgid(&nop_mnt_idmap, file_inode(file))) {
                ret = __ocfs2_write_remove_suid(inode, di_bh);
                if (ret) {
                        mlog_errno(ret);
@@ -2280,7 +2280,7 @@ static int ocfs2_prepare_inode_for_write(struct file *file,
                 * inode. There's also the dinode i_size state which
                 * can be lost via setattr during extending writes (we
                 * set inode->i_size at the end of a write. */
-               if (setattr_should_drop_suidgid(&init_user_ns, inode)) {
+               if (setattr_should_drop_suidgid(&nop_mnt_idmap, inode)) {
                        if (meta_level == 0) {
                                ocfs2_inode_unlock_for_extent_tree(inode,
                                                                   &di_bh,