aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-04 10:06:33 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-05 11:54:28 -0500
commitacfa4380efe77e290d3a96b11cd4c9f24f4fbb18 (patch)
treed656232c7ef39c83681c2de4c8e28ba439242f66 /mm
parent9742df331deb3fce95b321f38d4ea0c4e75edb63 (diff)
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c4
-rw-r--r--mm/nommu.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 0a2010a9518c..7b9db658aca2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2266,7 +2266,7 @@ int vmtruncate(struct inode * inode, loff_t offset)
2266 unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1); 2266 unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1);
2267 } 2267 }
2268 2268
2269 if (inode->i_op && inode->i_op->truncate) 2269 if (inode->i_op->truncate)
2270 inode->i_op->truncate(inode); 2270 inode->i_op->truncate(inode);
2271 return 0; 2271 return 0;
2272 2272
@@ -2286,7 +2286,7 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
2286 * a way to truncate a range of blocks (punch a hole) - 2286 * a way to truncate a range of blocks (punch a hole) -
2287 * we should return failure right now. 2287 * we should return failure right now.
2288 */ 2288 */
2289 if (!inode->i_op || !inode->i_op->truncate_range) 2289 if (!inode->i_op->truncate_range)
2290 return -ENOSYS; 2290 return -ENOSYS;
2291 2291
2292 mutex_lock(&inode->i_mutex); 2292 mutex_lock(&inode->i_mutex);
diff --git a/mm/nommu.c b/mm/nommu.c
index 7695dc850785..1c28ea3a4e9c 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -86,7 +86,7 @@ do_expand:
86 i_size_write(inode, offset); 86 i_size_write(inode, offset);
87 87
88out_truncate: 88out_truncate:
89 if (inode->i_op && inode->i_op->truncate) 89 if (inode->i_op->truncate)
90 inode->i_op->truncate(inode); 90 inode->i_op->truncate(inode);
91 return 0; 91 return 0;
92out_sig: 92out_sig: