All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Xiang <liu.xiang6@zte.com.cn>
To: jack@suse.com
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	liuxiang_1999@126.com, Liu Xiang <liu.xiang6@zte.com.cn>
Subject: [PATCH] ext2: Remove redundant check for finding no group
Date: Fri, 25 Jan 2019 22:01:36 +0800	[thread overview]
Message-ID: <1548424896-4692-1-git-send-email-liu.xiang6@zte.com.cn> (raw)

When best_desc keeps NULL, best_group keeps -1, too. So we can
return best_group directly.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
---
 fs/ext2/ialloc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 5c3d7b7..a0c5ea9 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -222,8 +222,6 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
 			best_desc = desc;
 		}
 	}
-	if (!best_desc)
-		return -1;
 
 	return best_group;
 }
-- 
1.9.1


             reply	other threads:[~2019-01-25 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 14:01 Liu Xiang [this message]
2019-01-28 14:51 ` [PATCH] ext2: Remove redundant check for finding no group Jan Kara

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=1548424896-4692-1-git-send-email-liu.xiang6@zte.com.cn \
    --to=liu.xiang6@zte.com.cn \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuxiang_1999@126.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.