mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Geliang Tang <geliangtang@gmail.com>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ext4: use i_blocksize()
Date: Fri, 20 Jan 2017 22:29:49 +0800	[thread overview]
Message-ID: <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com> (raw)

Since i_blocksize() helper has been defined in fs.h, use it instead
of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 fs/ext4/move_extent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 578f8c3..60222ed 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -382,7 +382,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
 	/* Perform all necessary steps similar write_begin()/write_end()
 	 * but keeping in mind that i_size will not change */
 	if (!page_has_buffers(pagep[0]))
-		create_empty_buffers(pagep[0], 1 << orig_inode->i_blkbits, 0);
+		create_empty_buffers(pagep[0], i_blocksize(orig_inode), 0);
 	bh = page_buffers(pagep[0]);
 	for (i = 0; i < data_offset_in_page; i++)
 		bh = bh->b_this_page;
-- 
2.9.3

             reply	other threads:[~2017-01-20 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 14:29 Geliang Tang [this message]
2017-01-20 14:29 ` [PATCH] fs/buffer: " Geliang Tang
2017-01-20 14:29 ` [PATCH] isofs: " Geliang Tang
2017-01-20 14:29 ` [PATCH] md/bitmap: " Geliang Tang
2017-01-20 15:00   ` Coly Li
2017-01-21 18:13   ` Shaohua Li
2017-01-22  1:50     ` Geliang Tang
2017-05-02 14:33       ` Geliang Tang
2017-01-20 14:29 ` [PATCH] staging: lustre: " Geliang Tang
2017-01-20 23:34   ` James Simmons
2017-01-20 14:29 ` [PATCH] truncate: " Geliang Tang
2017-01-20 17:39   ` Ross Zwisler

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=0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®