aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authormarcin.slusarz@gmail.com <marcin.slusarz@gmail.com>2008-02-03 13:36:06 -0500
committerJan Kara <jack@suse.cz>2008-04-17 08:22:29 -0400
commitf18f17b0338a388ad87a2f8078dbbfb83798bdfd (patch)
tree9c0f5eab25aaa18469336d57617c0978b4fd1f46 /fs
parent01b954a36a03d90a66c9dd1fc13e4cb51269caf7 (diff)
udf: udf_get_block, inode_bmap - remove unneeded checks
block cannot be less than 0, because it's sector_t, so remove unneeded checks Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/udf/inode.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index ddd7780d1ab1..fb92476fcdd9 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -308,9 +308,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
308 308
309 lock_kernel(); 309 lock_kernel();
310 310
311 if (block < 0)
312 goto abort_negative;
313
314 iinfo = UDF_I(inode); 311 iinfo = UDF_I(inode);
315 if (block == iinfo->i_next_alloc_block + 1) { 312 if (block == iinfo->i_next_alloc_block + 1) {
316 iinfo->i_next_alloc_block++; 313 iinfo->i_next_alloc_block++;
@@ -332,10 +329,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
332abort: 329abort:
333 unlock_kernel(); 330 unlock_kernel();
334 return err; 331 return err;
335
336abort_negative:
337 udf_warning(inode->i_sb, "udf_get_block", "block < 0");
338 goto abort;
339} 332}
340 333
341static struct buffer_head *udf_getblk(struct inode *inode, long block, 334static struct buffer_head *udf_getblk(struct inode *inode, long block,
@@ -2051,11 +2044,6 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
2051 int8_t etype; 2044 int8_t etype;
2052 struct udf_inode_info *iinfo; 2045 struct udf_inode_info *iinfo;
2053 2046
2054 if (block < 0) {
2055 printk(KERN_ERR "udf: inode_bmap: block < 0\n");
2056 return -1;
2057 }
2058
2059 iinfo = UDF_I(inode); 2047 iinfo = UDF_I(inode);
2060 pos->offset = 0; 2048 pos->offset = 0;
2061 pos->block = iinfo->i_location; 2049 pos->block = iinfo->i_location;