lkml.org 
[lkml]   [2006]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] sysfs: relay channel buffers as sysfs attributes
On Thu, Feb 23, 2006 at 04:29:35PM +0530, Maneesh Soni wrote:
> On Sun, Feb 19, 2006 at 11:07:57PM +0200, Paul Mundt wrote:
> > + dentry = lookup_one_len(filename, parent, strlen(filename));
>
> lookup_one_len() needs parent's i_mutex.
>
Good catch, thanks.

> > + if (IS_ERR(dentry))
> > + sysfs_hash_and_remove(parent, filename);
>
> Also wondering if you have considered the case of -EEXIST?
>
How is that going to happen? The line before we do sysfs_add_file(), and
if that errors out, then we never make it to lookup_one_len().

The IS_ERR() check is pretty superfluous anyways, perhaps it makes more
sense just to remove it and the sysfs_hash_and_remove() reference
entirely.
-
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-02-24 09:37    [W:0.062 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site