From: Sean Fu <fxinrong@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Sean Fu <fxinrong@gmail.com>
Subject: [PATCH] fs: buffer: Remove unnecessary initialisation for bh->b_state.
Date: Wed, 20 Dec 2017 18:16:58 +0800 [thread overview]
Message-ID: <1513765018-15439-1-git-send-email-fxinrong@gmail.com> (raw)
The memory is allocated by kmem_cache_zalloc and initialized with zero.
The bh->b_state initialisation is unnecessary in nobh_write_begin.
Signed-off-by: Sean Fu <fxinrong@gmail.com>
---
fs/buffer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 0736a6a..e9a1861 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2618,7 +2618,6 @@ int nobh_write_begin(struct address_space *mapping,
int create;
block_end = block_start + blocksize;
- bh->b_state = 0;
create = 1;
if (block_start >= to)
create = 0;
--
2.6.2
reply other threads:[~2017-12-20 10:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1513765018-15439-1-git-send-email-fxinrong@gmail.com \
--to=fxinrong@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®