reiserfs: remove duplicate define
PATCH 1/1 reiserfs: remove duplicate define
This patch removes a duplicate define in fs/reiserfs/reiserfs.h
--- fs/reiserfs/reiserfs.h | 1 - 1 file changed, 1 deletion(-)
fs/reiserfs/reiserfs.h +0 -1
@@ -597,7 +597,6 @@ void reiserfs_file_buffer(struct buffer_head *bh, int list);extern struct file_system_type reiserfs_fs_type;int reiserfs_resize (struct super_block *,unsigned long ); -#define CARRY_ON 0#define SCHEDULE_OCCURRED 1#define SB_BUFFER_WITH_SB (s) (REISERFS_SB(s)->s_sbh)
Signature · 1 line
1.8.1.2
Quoted 1 line · Michael Opdenacker
This patch removes a duplicate define in
fs/reiserfs/reiserfs.h
Hum, so the duplicate define certainly isn't nice but it's really a
result of a namespace collision between return codes of two different (sets of) functions. So deleting the duplicate isn't really solving the problem, just hiding it. So I'd prefer more one of the following two solutions:
1) Just ignore the problem. Reiserfs is mostly dead and this isn't likely to cause any subtle issues.
2) Prefix the return codes somehow so that those two error namespaces don't clash. As a bonus you can convert defines to enums but I'm not sure that's worth the bother (prefixing is a simple search & replace so that should be trivial, well except for the CARRY_ON case).
Honza
Quoted 21 lines
Signed-off-by Michael Opdenacker <[email protected]>--- fs/reiserfs/reiserfs.h | 1 - 1 file changed, 1 deletion(-)fs/reiserfs/reiserfs.h +0
-1@@ -597,7 +597,6 @@ void reiserfs_file_buffer(struct buffer_head *bh, int list);extern struct file_system_type reiserfs_fs_type;int reiserfs_resize (struct super_block *,unsigned long ); -#define CARRY_ON 0#define SCHEDULE_OCCURRED 1#define SB_BUFFER_WITH_SB (s) (REISERFS_SB(s)->s_sbh)Signature · 1 line
1.8.1.2
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Hi Jan,
Thank you for your review!
Quoted 12 lines · Jan Kara
Quoted 1 line · Michael Opdenacker
This patch removes a duplicate define in
fs/reiserfs/reiserfs.hHum, so the duplicate define certainly isn't nice but it's really a
result of a namespace collision between return codes of two different (sets of) functions. So deleting the duplicate isn't really solving the problem, just hiding it. So I'd prefer more one of the following two solutions:
1) Just ignore the problem. Reiserfs is mostly dead and this isn't likely to cause any subtle issues.
2) Prefix the return codes somehow so that those two error namespaces don't clash. As a bonus you can convert defines to enums but I'm not sure that's worth the bother (prefixing is a simple search & replace so that should be trivial, well except for theCARRY_ONcase).
I like your second solution, adding a prefix to avoid collisions between two error namespaces, all the more as this looks like a good solution for similar issues that I found.
Thanks again,
Cheers,
Michael.
Signature · 4 lines
Michael Opdenacker, CEO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com +33 484 258 098