mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + ocfs2-remove-redundant-assignment-to-variable-free_space.patch added to -mm tree
@ 2022-01-13 19:58 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2022-01-13 19:58 UTC (permalink / raw)
  To: colin.i.king, gechangwei, ghe, jlbec, joseph.qi, junxiao.bi,
	mark, mm-commits, piaojun


The patch titled
     Subject: ocfs2: remove redundant assignment to variable free_space
has been added to the -mm tree.  Its filename is
     ocfs2-remove-redundant-assignment-to-variable-free_space.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/ocfs2-remove-redundant-assignment-to-variable-free_space.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-remove-redundant-assignment-to-variable-free_space.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Colin Ian King <colin.i.king@gmail.com>
Subject: ocfs2: remove redundant assignment to variable free_space

Variable free_space is being initialized with a value that is not read, it
is being re-assigned later in the two paths of an if statement.  The early
initialization is redundant and can be removed.

Link: https://lkml.kernel.org/r/20220112230411.1090761-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ocfs2/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ocfs2/dir.c~ocfs2-remove-redundant-assignment-to-variable-free_space
+++ a/fs/ocfs2/dir.c
@@ -3343,7 +3343,7 @@ static int ocfs2_find_dir_space_id(struc
 	struct ocfs2_dir_entry *de, *last_de = NULL;
 	char *de_buf, *limit;
 	unsigned long offset = 0;
-	unsigned int rec_len, new_rec_len, free_space = dir->i_sb->s_blocksize;
+	unsigned int rec_len, new_rec_len, free_space;
 
 	/*
 	 * This calculates how many free bytes we'd have in block zero, should
_

Patches currently in -mm which might be from colin.i.king@gmail.com are

ocfs2-remove-redundant-assignment-to-pointer-root_bh.patch
ocfs2-remove-redundant-assignment-to-variable-free_space.patch
mm-migrate-remove-redundant-variables-used-in-a-for-loop.patch
nilfs2-remove-redundant-pointer-sbufs.patch
lib-remove-redundant-assignment-to-variable-ret.patch
kernel-sysctlc-remove-unused-variable-ten_thousand.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-13 19:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 19:58 + ocfs2-remove-redundant-assignment-to-variable-free_space.patch added to -mm tree akpm

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).