You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
inode->i_op is never NULL
We used to have rather schizophrenic set of checks for NULL ->i_op even though it had been eliminated years ago. You'd need to go out of your way to set it to NULL explicitly _and_ a bunch of code would die on such inodes anyway. After killing two remaining places that still did that bogosity, all that crap can go away. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
+2
-2
@@ -2266,7 +2266,7 @@ int vmtruncate(struct inode * inode, loff_t offset)
|
||||
unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1);
|
||||
}
|
||||
|
||||
if (inode->i_op && inode->i_op->truncate)
|
||||
if (inode->i_op->truncate)
|
||||
inode->i_op->truncate(inode);
|
||||
return 0;
|
||||
|
||||
@@ -2286,7 +2286,7 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
|
||||
* a way to truncate a range of blocks (punch a hole) -
|
||||
* we should return failure right now.
|
||||
*/
|
||||
if (!inode->i_op || !inode->i_op->truncate_range)
|
||||
if (!inode->i_op->truncate_range)
|
||||
return -ENOSYS;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
||||
Reference in New Issue
Block a user