* [PATCH] nilfs2: fix ignored error code in __nilfs_read_inode()
@ 2009-08-22 11:21 Ryusuke Konishi
[not found] ` <20090822.202157.120631059.ryusuke-sG5X7nlA6pw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ryusuke Konishi @ 2009-08-22 11:21 UTC (permalink / raw)
To: users-JrjvKiOkagjYtjvyW6yDsg
Cc: Yuri Chislov, konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg
Hi Yuri,
I found a bug in an inode routine when I was looking at the problem
you reported. The attached patch is the bugfix for that.
I think this is _not_ the cause of your corruption problem. (in
either case I will send this upstream at some time)
If you apply this, you may see "NILFS: get root inode failed" error
instead of "NILFS: corrupt root inode.".
Regards,
Ryusuke Konishi
--
From: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
nilfs2: fix ignored error code in __nilfs_read_inode()
The __nilfs_read_inode function is ignoring the error code returned
from nilfs_read_inode_common(), and wrongly delivers a success code
(zero) when it escapes from the function in erroneous cases.
This adds the missing error handling.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
---
fs/nilfs2/inode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index fe9d8f2..807e584 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -430,7 +430,8 @@ static int __nilfs_read_inode(struct super_block *sb, unsigned long ino,
raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, bh);
- if (nilfs_read_inode_common(inode, raw_inode))
+ err = nilfs_read_inode_common(inode, raw_inode);
+ if (err)
goto failed_unmap;
if (S_ISREG(inode->i_mode)) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nilfs2: fix ignored error code in __nilfs_read_inode()
[not found] ` <20090822.202157.120631059.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2009-08-22 11:41 ` Yuri Chislov
0 siblings, 0 replies; 2+ messages in thread
From: Yuri Chislov @ 2009-08-22 11:41 UTC (permalink / raw)
To: NILFS Users mailing list
Hi,
On Saturday 22 August 2009 14:21:57 Ryusuke Konishi wrote:
> If you apply this, you may see "NILFS: get root inode failed" error
> instead of "NILFS: corrupt root inode.".
I still get the same error. I add some printk to super.c before line 847
I get, that S_ISLNK(root->i_mode) is True
Thank you.
Yuri.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-22 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 11:21 [PATCH] nilfs2: fix ignored error code in __nilfs_read_inode() Ryusuke Konishi
[not found] ` <20090822.202157.120631059.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-08-22 11:41 ` Yuri Chislov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.