lkml.org 
[lkml]   [2005]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 17 Oct 2005 16:10:03 +0200
FromJesper Juhl <>
SubjectRe: [PATCH] Test for sb_getblk return value
On 10/17/05, Glauber de Oliveira Costa <glauber@br.ibm.com> wrote:
> Hi all,
>
> As we discussed earlier, I'm sending a patch that adds test for the
> return value of sb_getblk. This time I focused on the code of the ext2/3
> filesystems. I'm assuming that getblk fails happens due to I/O errors
> and thus returning returning an EIO back wherever it's needed.
>

> - bh = sb_getblk(inode->i_sb, parent);
> + if (!(bh = sb_getblk(inode->i_sb, parent))){
> + err = -EIO;
> + break;
> + }

Would be more readable as

bh = sb_getblk(inode->i_sb, parent);
if (!bh) {
err = -EIO;
break;
}

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-17 16:18    [from the cache]
©2003-2010