Commit f18f17b0 authored by marcin.slusarz@gmail.com's avatar marcin.slusarz@gmail.com Committed by Jan Kara

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: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 01b954a3
...@@ -308,9 +308,6 @@ static int udf_get_block(struct inode *inode, sector_t block, ...@@ -308,9 +308,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
lock_kernel(); lock_kernel();
if (block < 0)
goto abort_negative;
iinfo = UDF_I(inode); iinfo = UDF_I(inode);
if (block == iinfo->i_next_alloc_block + 1) { if (block == iinfo->i_next_alloc_block + 1) {
iinfo->i_next_alloc_block++; iinfo->i_next_alloc_block++;
...@@ -332,10 +329,6 @@ static int udf_get_block(struct inode *inode, sector_t block, ...@@ -332,10 +329,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
abort: abort:
unlock_kernel(); unlock_kernel();
return err; return err;
abort_negative:
udf_warning(inode->i_sb, "udf_get_block", "block < 0");
goto abort;
} }
static struct buffer_head *udf_getblk(struct inode *inode, long block, static 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,11 +2044,6 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
int8_t etype; int8_t etype;
struct udf_inode_info *iinfo; struct udf_inode_info *iinfo;
if (block < 0) {
printk(KERN_ERR "udf: inode_bmap: block < 0\n");
return -1;
}
iinfo = UDF_I(inode); iinfo = UDF_I(inode);
pos->offset = 0; pos->offset = 0;
pos->block = iinfo->i_location; pos->block = iinfo->i_location;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment