Skip to content

Commit 1cd925d

Browse files
Christoph Hellwigaxboe
authored andcommitted
bdi: remove the name field in struct backing_dev_info
The name is only printed for a not registered bdi in writeback. Use the device name there as is more useful anyway for the unlike case that the warning triggers. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent aef33c2 commit 1cd925d

File tree

6 files changed

+1
-8
lines changed

6 files changed

+1
-8
lines changed

block/blk-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ struct request_queue *__blk_alloc_queue(int node_id)
511511

512512
q->backing_dev_info->ra_pages = VM_READAHEAD_PAGES;
513513
q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK;
514-
q->backing_dev_info->name = "block";
515514
q->node = node_id;
516515

517516
timer_setup(&q->backing_dev_info->laptop_mode_wb_timer,

drivers/mtd/mtdcore.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,6 @@ static struct backing_dev_info * __init mtd_bdi_init(char *name)
20402040
if (!bdi)
20412041
return ERR_PTR(-ENOMEM);
20422042

2043-
bdi->name = name;
20442043
/*
20452044
* We put '-0' suffix to the name to get the same name format as we
20462045
* used to get. Since this is called only once, we get a unique name.

fs/fs-writeback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
23202320

23212321
WARN(bdi_cap_writeback_dirty(wb->bdi) &&
23222322
!test_bit(WB_registered, &wb->state),
2323-
"bdi-%s not registered\n", wb->bdi->name);
2323+
"bdi-%s not registered\n", bdi_dev_name(wb->bdi));
23242324

23252325
inode->dirtied_when = jiffies;
23262326
if (dirtytime)

fs/super.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,6 @@ int super_setup_bdi_name(struct super_block *sb, char *fmt, ...)
16021602
if (!bdi)
16031603
return -ENOMEM;
16041604

1605-
bdi->name = sb->s_type->name;
1606-
16071605
va_start(args, fmt);
16081606
err = bdi_register_va(bdi, fmt, args);
16091607
va_end(args);

include/linux/backing-dev-defs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ struct backing_dev_info {
193193
congested_fn *congested_fn; /* Function pointer if device is md/dm */
194194
void *congested_data; /* Pointer to aux data for congested func */
195195

196-
const char *name;
197-
198196
struct kref refcnt; /* Reference counter for the structure */
199197
unsigned int capabilities; /* Device capabilities */
200198
unsigned int min_ratio;

mm/backing-dev.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <trace/events/writeback.h>
1616

1717
struct backing_dev_info noop_backing_dev_info = {
18-
.name = "noop",
1918
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
2019
};
2120
EXPORT_SYMBOL_GPL(noop_backing_dev_info);

0 commit comments

Comments
 (0)