From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 3/3] ext4: remove obsoleted check
Date: Sun, 13 Apr 2014 19:36:01 +0400 [thread overview]
Message-ID: <1397403361-20459-3-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1397403361-20459-1-git-send-email-dmonakhov@openvz.org>
BH can not be NULL at this point, ext4_read_dirblock() always return
non null value, and we already have done all necessery checks.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
fs/ext4/namei.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 1cb84f7..a683f95 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2510,8 +2510,7 @@ static int empty_dir(struct inode *inode)
ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize);
de = ext4_next_entry(de1, sb->s_blocksize);
while (offset < inode->i_size) {
- if (!bh ||
- (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
+ if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
unsigned int lblock;
err = 0;
brelse(bh);
--
1.7.1
next prev parent reply other threads:[~2014-04-13 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-13 15:35 [PATCH 1/3] ext4: Fix error handling in ext4_ext_shift_extents Dmitry Monakhov
2014-04-13 15:36 ` [PATCH 2/3] ext4: always check ext4_ext_find_extent result Dmitry Monakhov
2014-04-13 22:06 ` Theodore Ts'o
2014-04-13 15:36 ` Dmitry Monakhov [this message]
2014-04-13 22:13 ` [PATCH 3/3] ext4: remove obsoleted check Theodore Ts'o
2014-04-13 19:10 ` [PATCH 1/3] ext4: Fix error handling in ext4_ext_shift_extents Theodore Ts'o
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=1397403361-20459-3-git-send-email-dmonakhov@openvz.org \
--to=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).