From: marcin.slusarz@gmail.com
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>, Marcin Slusarz <marcin.slusarz@gmail.com>
Subject: [PATCH 1/6] udf: udf_get_block, inode_bmap - remove unneeded checks
Date: Sun, 3 Feb 2008 19:36:06 +0100 [thread overview]
Message-ID: <1202063771-18172-2-git-send-email-marcin.slusarz@gmail.com> (raw)
In-Reply-To: <1202063771-18172-1-git-send-email-marcin.slusarz@gmail.com>
block cannot be less than 0, because it's sector_t,
so remove unneeded checks
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
---
fs/udf/inode.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index c2d0477..531443d 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -323,9 +323,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++;
@@ -347,10 +344,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,
@@ -2081,11 +2074,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;
--
1.5.3.7
next prev parent reply other threads:[~2008-02-03 18:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 18:36 [PATCH 0/6] udf: next round of cleanups marcin.slusarz
2008-02-03 18:36 ` marcin.slusarz [this message]
2008-02-05 15:30 ` [PATCH 1/6] udf: udf_get_block, inode_bmap - remove unneeded checks Jan Kara
2008-02-03 18:36 ` [PATCH 2/6] udf: create function for conversion from timestamp to timespec marcin.slusarz
2008-02-05 15:32 ` Jan Kara
2008-02-03 18:36 ` [PATCH 3/6] udf: convert udf_stamp_to_time to return struct timespec marcin.slusarz
2008-02-05 15:48 ` Jan Kara
2008-02-05 19:12 ` Marcin Slusarz
2008-02-06 13:25 ` Jan Kara
2008-02-03 18:36 ` [PATCH 4/6] udf: convert udf_stamp_to_time and udf_time_to_stamp to use timestamps marcin.slusarz
2008-02-05 15:59 ` Jan Kara
2008-02-05 19:21 ` Marcin Slusarz
2008-02-06 11:10 ` Jan Kara
2008-02-10 10:25 ` Marcin Slusarz
2008-02-03 18:36 ` [PATCH 5/6] udf: remove unneeded kernel_timestamp type marcin.slusarz
2008-02-05 16:01 ` Jan Kara
2008-02-10 10:29 ` Marcin Slusarz
2008-02-03 18:42 ` [PATCH 6/6] udf: super.c reorganization Marcin Slusarz
2008-02-05 16:22 ` Jan Kara
2008-02-05 19:34 ` Marcin Slusarz
2008-02-06 11:09 ` Jan Kara
2008-02-10 10:33 ` Marcin Slusarz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202063771-18172-2-git-send-email-marcin.slusarz@gmail.com \
--to=marcin.slusarz@gmail.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome