lkml.org 
[lkml]   [2006]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 29 Jun 2006 08:27:01 +0300
From"Pekka Enberg" <>
SubjectRe: [V9fs-developer] [Patch] Dead code in fs/9p/vfs_inode.c
On 6/29/06, Russ Cox <rsc@swtch.com> wrote:
> >  error:
> >         kfree(fcall);
> > -       if (ret)
> > -               iput(ret);
> > -
> >         return ERR_PTR(err);
> >  }
>
> What about when someone changes the code and does have ret != NULL here?
> This seems like reasonable defensive programming to me.

Well, you're not supposed to change code without auditing for things
like this anyway. Also, I fail to see why/how you would change
v9fs_inode_from_fid() for that to happen?  I'd say kill the check.

                                                   Pekka
-
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: 2006-06-29 07:29    [from the cache]
©2003-2008