[Ocfs2-devel] [PATCH] Set return value to -EINVAL if superblock	probe failed
    Laszlo Attila Toth 
    toth.laszlo.attila at balabit.hu
       
    Mon Oct 12 02:16:44 PDT 2009
    
    
  
In case of non-modular kernels the root filesystem is mounted by trying
several filesystems. If ocfs2 is tried before the actual filesystem type,
such as squashfs, the mount is failed because ocfs2_fill_super's return
value was -EAGAIN and normally it should return with -EINVAL, which means
the filesystem is non-ocfs2.
Signed-off-by: Laszlo Attila Toth <panther at balabit.hu>
---
 fs/ocfs2/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 476d488..1f506de 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -621,6 +621,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
 	/* probe for superblock */
 	status = ocfs2_sb_probe(sb, &bh, §or_size);
 	if (status < 0) {
+		status = -EINVAL;
 		mlog(ML_ERROR, "superblock probe failed!\n");
 		goto read_super_error;
 	}
-- 
1.6.4.rc2
    
    
More information about the Ocfs2-devel
mailing list