RE: [PATCH 3/4] f2fs: handle error of f2fs_iget correctly
From: Chao Yu
Date: Tue Aug 11 2015 - 06:43:30 EST
Hi Jaegeuk,
> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@xxxxxxxxxx]
> Sent: Tuesday, August 11, 2015 3:32 AM
> To: Chao Yu
> Cc: linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> linux-fsdevel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 3/4] f2fs: handle error of f2fs_iget correctly
>
> Hi Chao,
>
> On Fri, Aug 07, 2015 at 06:41:02PM +0800, Chao Yu wrote:
> > In recover_orphan_inode, if f2fs_iget failed, we change to report the
> > error number to its caller instead of bug_on.
>
> Let's keep this in order to catch any bugs.
> Or, is there another issue on this?
f2fs_iget can fail due to a lot of reason, like out of memory, IMO,
it's better to report such error number to user instead of make kernel
panic. So how about keeping bug_on when finding no entry for orphan
inode, otherwise reporting error to caller?