ioctl.c (2ac5e38ea4203852d6e99edd3cf11f044b0a409f) ioctl.c (8a363970d1dc38c4ec4ad575c862f776f468d057)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/ext4/ioctl.c
4 *
5 * Copyright (C) 1993, 1994, 1995
6 * Remy Card (card@masi.ibp.fr)
7 * Laboratoire MASI - Institut Blaise Pascal
8 * Universite Pierre et Marie Curie (Paris VI)

--- 111 unchanged lines hidden (view full) ---

120 IS_SWAPFILE(inode) || IS_ENCRYPTED(inode) ||
121 ext4_has_inline_data(inode))
122 return -EINVAL;
123
124 if (IS_RDONLY(inode) || IS_APPEND(inode) || IS_IMMUTABLE(inode) ||
125 !inode_owner_or_capable(inode) || !capable(CAP_SYS_ADMIN))
126 return -EPERM;
127
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/ext4/ioctl.c
4 *
5 * Copyright (C) 1993, 1994, 1995
6 * Remy Card (card@masi.ibp.fr)
7 * Laboratoire MASI - Institut Blaise Pascal
8 * Universite Pierre et Marie Curie (Paris VI)

--- 111 unchanged lines hidden (view full) ---

120 IS_SWAPFILE(inode) || IS_ENCRYPTED(inode) ||
121 ext4_has_inline_data(inode))
122 return -EINVAL;
123
124 if (IS_RDONLY(inode) || IS_APPEND(inode) || IS_IMMUTABLE(inode) ||
125 !inode_owner_or_capable(inode) || !capable(CAP_SYS_ADMIN))
126 return -EPERM;
127
128 inode_bl = ext4_iget(sb, EXT4_BOOT_LOADER_INO);
128 inode_bl = ext4_iget(sb, EXT4_BOOT_LOADER_INO, EXT4_IGET_SPECIAL);
129 if (IS_ERR(inode_bl))
130 return PTR_ERR(inode_bl);
131 ei_bl = EXT4_I(inode_bl);
132
133 filemap_flush(inode->i_mapping);
134 filemap_flush(inode_bl->i_mapping);
135
136 /* Protect orig inodes against a truncate and make sure,

--- 1013 unchanged lines hidden ---
129 if (IS_ERR(inode_bl))
130 return PTR_ERR(inode_bl);
131 ei_bl = EXT4_I(inode_bl);
132
133 filemap_flush(inode->i_mapping);
134 filemap_flush(inode_bl->i_mapping);
135
136 /* Protect orig inodes against a truncate and make sure,

--- 1013 unchanged lines hidden ---