* [PATCH] nilfs2-utils: fix bug when opening non-nilfs2 device
@ 2010-09-10 9:33 Jiro SEKIBA
[not found] ` <87vd6ec596.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jiro SEKIBA @ 2010-09-10 9:33 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Ryusuke Konishi, Ryusuke Konishi
Hi,
This patch fixes a wrong return value of nilfs_sb_read when opening
non-nilfs2 device. nilfs_sb_read should return NULL in case it was
not a nilfs2 device instead of "-1" to indicate error.
Signed-off-by: Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
---
lib/sb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sb.c b/lib/sb.c
index 201b9ad..b60575d 100644
--- a/lib/sb.c
+++ b/lib/sb.c
@@ -161,7 +161,7 @@ struct nilfs_super_block *nilfs_sb_read(int devfd)
struct nilfs_super_block *sbp[2];
if (__nilfs_sb_read(devfd, sbp, NULL))
- return -1;
+ return NULL;
if (!sbp[0]) {
sbp[0] = sbp[1];
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-11 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 9:33 [PATCH] nilfs2-utils: fix bug when opening non-nilfs2 device Jiro SEKIBA
[not found] ` <87vd6ec596.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2010-09-11 5:57 ` Ryusuke Konishi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox