diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-22 13:25:39 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-01-25 03:14:06 -0500 |
commit | 2ccdc413196b43a02bb68b46be5b68850904e9ea (patch) | |
tree | f7405674f1706ebad378533c1386c021d198fe11 /fs/reiserfs | |
parent | b42d570c9fbebc8e779fbcbc2b598fa94a0e809f (diff) |
kill reiserfs_bdevname()
it's never called with NULL argument...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/procfs.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/reiserfs.h | 8 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 8 |
3 files changed, 6 insertions, 14 deletions
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index a958444a75fc..02b0b7d0f7d5 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c | |||
@@ -419,7 +419,7 @@ int reiserfs_proc_info_init(struct super_block *sb) | |||
419 | char *s; | 419 | char *s; |
420 | 420 | ||
421 | /* Some block devices use /'s */ | 421 | /* Some block devices use /'s */ |
422 | strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); | 422 | strlcpy(b, sb->s_id, BDEVNAME_SIZE); |
423 | s = strchr(b, '/'); | 423 | s = strchr(b, '/'); |
424 | if (s) | 424 | if (s) |
425 | *s = '!'; | 425 | *s = '!'; |
@@ -449,7 +449,7 @@ int reiserfs_proc_info_done(struct super_block *sb) | |||
449 | char *s; | 449 | char *s; |
450 | 450 | ||
451 | /* Some block devices use /'s */ | 451 | /* Some block devices use /'s */ |
452 | strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); | 452 | strlcpy(b, sb->s_id, BDEVNAME_SIZE); |
453 | s = strchr(b, '/'); | 453 | s = strchr(b, '/'); |
454 | if (s) | 454 | if (s) |
455 | *s = '!'; | 455 | *s = '!'; |
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index f8adaee537c2..24f068c33b48 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h | |||
@@ -608,14 +608,6 @@ int reiserfs_resize(struct super_block *, unsigned long); | |||
608 | 608 | ||
609 | #define SB_DISK_JOURNAL_HEAD(s) (SB_JOURNAL(s)->j_header_bh->) | 609 | #define SB_DISK_JOURNAL_HEAD(s) (SB_JOURNAL(s)->j_header_bh->) |
610 | 610 | ||
611 | /* A safe version of the "bdevname", which returns the "s_id" field of | ||
612 | * a superblock or else "Null superblock" if the super block is NULL. | ||
613 | */ | ||
614 | static inline char *reiserfs_bdevname(struct super_block *s) | ||
615 | { | ||
616 | return (s == NULL) ? "Null superblock" : s->s_id; | ||
617 | } | ||
618 | |||
619 | #define reiserfs_is_journal_aborted(journal) (unlikely (__reiserfs_is_journal_aborted (journal))) | 611 | #define reiserfs_is_journal_aborted(journal) (unlikely (__reiserfs_is_journal_aborted (journal))) |
620 | static inline int __reiserfs_is_journal_aborted(struct reiserfs_journal | 612 | static inline int __reiserfs_is_journal_aborted(struct reiserfs_journal |
621 | *journal) | 613 | *journal) |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 3ead145dadc4..2c803353f8ac 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1479,7 +1479,7 @@ static int read_super_block(struct super_block *s, int offset) | |||
1479 | if (!bh) { | 1479 | if (!bh) { |
1480 | reiserfs_warning(s, "sh-2006", | 1480 | reiserfs_warning(s, "sh-2006", |
1481 | "bread failed (dev %s, block %lu, size %lu)", | 1481 | "bread failed (dev %s, block %lu, size %lu)", |
1482 | reiserfs_bdevname(s), offset / s->s_blocksize, | 1482 | s->s_id, offset / s->s_blocksize, |
1483 | s->s_blocksize); | 1483 | s->s_blocksize); |
1484 | return 1; | 1484 | return 1; |
1485 | } | 1485 | } |
@@ -1500,7 +1500,7 @@ static int read_super_block(struct super_block *s, int offset) | |||
1500 | if (!bh) { | 1500 | if (!bh) { |
1501 | reiserfs_warning(s, "sh-2007", | 1501 | reiserfs_warning(s, "sh-2007", |
1502 | "bread failed (dev %s, block %lu, size %lu)", | 1502 | "bread failed (dev %s, block %lu, size %lu)", |
1503 | reiserfs_bdevname(s), offset / s->s_blocksize, | 1503 | s->s_id, offset / s->s_blocksize, |
1504 | s->s_blocksize); | 1504 | s->s_blocksize); |
1505 | return 1; | 1505 | return 1; |
1506 | } | 1506 | } |
@@ -1509,7 +1509,7 @@ static int read_super_block(struct super_block *s, int offset) | |||
1509 | if (sb_blocksize(rs) != s->s_blocksize) { | 1509 | if (sb_blocksize(rs) != s->s_blocksize) { |
1510 | reiserfs_warning(s, "sh-2011", "can't find a reiserfs " | 1510 | reiserfs_warning(s, "sh-2011", "can't find a reiserfs " |
1511 | "filesystem on (dev %s, block %Lu, size %lu)", | 1511 | "filesystem on (dev %s, block %Lu, size %lu)", |
1512 | reiserfs_bdevname(s), | 1512 | s->s_id, |
1513 | (unsigned long long)bh->b_blocknr, | 1513 | (unsigned long long)bh->b_blocknr, |
1514 | s->s_blocksize); | 1514 | s->s_blocksize); |
1515 | brelse(bh); | 1515 | brelse(bh); |
@@ -1825,7 +1825,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1825 | /* try new format (64-th 1k block), which can contain reiserfs super block */ | 1825 | /* try new format (64-th 1k block), which can contain reiserfs super block */ |
1826 | else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) { | 1826 | else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) { |
1827 | SWARN(silent, s, "sh-2021", "can not find reiserfs on %s", | 1827 | SWARN(silent, s, "sh-2021", "can not find reiserfs on %s", |
1828 | reiserfs_bdevname(s)); | 1828 | s->s_id); |
1829 | goto error_unlocked; | 1829 | goto error_unlocked; |
1830 | } | 1830 | } |
1831 | 1831 | ||