]> err.no Git - linux-2.6/commitdiff
udf: udf_get_block, inode_bmap - remove unneeded checks
authormarcin.slusarz@gmail.com <marcin.slusarz@gmail.com>
Sun, 3 Feb 2008 18:36:06 +0000 (19:36 +0100)
committerJan Kara <jack@suse.cz>
Thu, 17 Apr 2008 12:22:29 +0000 (14:22 +0200)
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>
fs/udf/inode.c

index ddd7780d1ab1d217a239d76f7842d834a8e1733f..fb92476fcdd9e260670cc2fe546fecc842a7f10c 100644 (file)
@@ -308,9 +308,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
 
        lock_kernel();
 
-       if (block < 0)
-               goto abort_negative;
-
        iinfo = UDF_I(inode);
        if (block == iinfo->i_next_alloc_block + 1) {
                iinfo->i_next_alloc_block++;
@@ -332,10 +329,6 @@ static int udf_get_block(struct inode *inode, sector_t block,
 abort:
        unlock_kernel();
        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,
@@ -2051,11 +2044,6 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
        int8_t etype;
        struct udf_inode_info *iinfo;
 
-       if (block < 0) {
-               printk(KERN_ERR "udf: inode_bmap: block < 0\n");
-               return -1;
-       }
-
        iinfo = UDF_I(inode);
        pos->offset = 0;
        pos->block = iinfo->i_location;