All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Hugh Dickins <hughd@google.com>, linux-mm@kvack.org
Subject: [PATCH] mm: trivial code style fix to shmem_statfs
Date: Mon, 14 Jul 2014 15:52:26 +0800	[thread overview]
Message-ID: <53C38C3A.3090903@gmail.com> (raw)


Should read the super_block fields, even if current implementation uses
the same constants.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
 mm/shmem.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index 1140f49..368523b 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1874,10 +1874,11 @@ out:

 static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
-       struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
+       struct super_block *sb = dentry->d_sb;
+       struct shmem_sb_info *sbinfo = SHMEM_SB(sb);

-       buf->f_type = TMPFS_MAGIC;
-       buf->f_bsize = PAGE_CACHE_SIZE;
+       buf->f_type = sb->s_magic;
+       buf->f_bsize = sb->s_blocksize;
        buf->f_namelen = NAME_MAX;
        if (sbinfo->max_blocks) {
                buf->f_blocks = sbinfo->max_blocks;
-- 
1.8.3.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-07-14  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14  7:52 Wang Sheng-Hui [this message]
2014-07-14 19:36 ` [PATCH] mm: trivial code style fix to shmem_statfs Hugh Dickins

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=53C38C3A.3090903@gmail.com \
    --to=shhuiw@gmail.com \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    /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.