fs-writeback: Replace sb->s_type->name with sb->s_id to get name of super_block.
PATCH 1/1 fs-writeback: Replace sb->s_type->name with sb->s_id to get name of super_block.
Signed-off-by Jianpeng Ma <[email protected]>
--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs-writeback.c +1 -1
@@ -69,7 +69,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) {struct super_block *sb = inode->i_sb; -if (strcmp (sb->s_type->name,"bdev" ) ==0 ) +if (strcmp (sb->s_id,"bdev" ) ==0 )return inode->i_mapping->backing_dev_info;return sb->s_bdi;
Signature · 1 line
1.8.4
Quoted 10 lines · On Fri, 13 Sep 2013 10:58:23 +0800 majianpeng <[email protected]> wrote:
Signed-off-by Jianpeng Ma <[email protected]>--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs-writeback.c +0
-0
fs/fs-writeback.c static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) · line 75
Quoted 8 lines
fs/fs-writeback.c +1
-1@@ -69,7 +69,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) {struct super_block *sb = inode->i_sb; -if (strcmp (sb->s_type->name,"bdev" ) ==0 ) +if (strcmp (sb->s_id,"bdev" ) ==0 )return inode->i_mapping->backing_dev_info;return sb->s_bdi;
inode_to_bdi() doesn't exist any more, but similar code exists in the remarkably named block_dump___mark_inode_dirty().
Using strcmp() is nasty. Can't we use sb_is_blkdev_sb() in there?
Quoted 15 lines · On Tue, 8 Oct 2013 15:48:53 -0700 Andrew Morton <[email protected]>…
Quoted 13 lines · On Fri, 13 Sep 2013 10:58:23 +0800 majianpeng <[email protected]> wrote:
Signed-off-by Jianpeng Ma <[email protected]>--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs-writeback.c +0
-0@@ -69,7 +69,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) {struct super_block *sb = inode->i_sb;
Quoted 7 lines
fs/fs-writeback.c static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) · line 75
Quoted 5 lines
fs/fs-writeback.c +1
-1-if (strcmp (sb->s_type->name,"bdev" ) ==0 ) +if (strcmp (sb->s_id,"bdev" ) ==0 )return inode->i_mapping->backing_dev_info;return sb->s_bdi;
inode_to_bdi()doesn't exist any more
err, actually it does exist, but has already been converted to use sb_is_blkdev_sb().
Quoted 4 lines
but similar code exists in the
remarkably namedblock_dump___mark_inode_dirty().Using
strcmp()is nasty. Can't we usesb_is_blkdev_sb()in there?
This.