[PATCH] mm: trivial code style fix to shmem_statfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Wang Sheng-Hui <shhuiw@xxxxxxxxx>
---
 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]