<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/sysfs, branch linux-2.6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2006-10-13T18:50:10Z</updated>
<entry>
<title>sysfs: remove duplicated dput in sysfs_update_file</title>
<updated>2006-10-13T18:50:10Z</updated>
<author>
<name>Hidetoshi Seto</name>
<email>seto.hidetoshi@jp.fujitsu.com</email>
</author>
<published>2006-09-29T08:05:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=91d72bbd4cc7a04e3c2402da85385a2fb377575a'/>
<id>urn:sha1:91d72bbd4cc7a04e3c2402da85385a2fb377575a</id>
<content type='text'>
Following function can drops d_count twice against one reference
by lookup_one_len.

&lt;SOURCE&gt;
/**
 * sysfs_update_file - update the modified timestamp on an object attribute.
 * @kobj: object we're acting for.
 * @attr: attribute descriptor.
 */
int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
{
        struct dentry * dir = kobj-&gt;dentry;
        struct dentry * victim;
        int res = -ENOENT;

        mutex_lock(&amp;dir-&gt;d_inode-&gt;i_mutex);
        victim = lookup_one_len(attr-&gt;name, dir, strlen(attr-&gt;name));
        if (!IS_ERR(victim)) {
                /* make sure dentry is really there */
                if (victim-&gt;d_inode &amp;&amp;
                    (victim-&gt;d_parent-&gt;d_inode == dir-&gt;d_inode)) {
                        victim-&gt;d_inode-&gt;i_mtime = CURRENT_TIME;
                        fsnotify_modify(victim);

                        /**
                         * Drop reference from initial sysfs_get_dentry().
                         */
                        dput(victim);
                        res = 0;
                } else
                        d_drop(victim);

                /**
                 * Drop the reference acquired from sysfs_get_dentry() above.
                 */
                dput(victim);
        }
        mutex_unlock(&amp;dir-&gt;d_inode-&gt;i_mutex);

        return res;
}
&lt;/SOURCE&gt;

PCI-hotplug (drivers/pci/hotplug/pci_hotplug_core.c) is only user of
this function. I confirmed that dentry of /sys/bus/pci/slots/XXX/*
have negative d_count value.

This patch removes unnecessary dput().

Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[PATCH] sysfs: Allow sysfs attribute files to be pollable</title>
<updated>2006-04-14T18:41:24Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2006-03-20T06:53:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4508a7a734b111b8b7e39986237d84acb1168dd0'/>
<id>urn:sha1:4508a7a734b111b8b7e39986237d84acb1168dd0</id>
<content type='text'>
It works like this:
  Open the file
  Read all the contents.
  Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
  When poll returns,
     close the file and go to top of loop.
   or lseek to start of file and go back to the 'read'.

Events are signaled by an object manager calling
   sysfs_notify(kobj, dir, attr);

If the dir is non-NULL, it is used to find a subdirectory which
contains the attribute (presumably created by sysfs_create_group).

This has a cost of one int  per attribute, one wait_queuehead per kobject,
one int per open file.

The name "sysfs_notify" may be confused with the inotify
functionality.  Maybe it would be nice to support inotify for sysfs
attributes as well?

This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
to be pollable

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysfs: zero terminate sysfs write buffers</title>
<updated>2006-04-02T20:03:31Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-03-31T23:37:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e0dd741a89be35defa05bd79f4211c5a2762825'/>
<id>urn:sha1:6e0dd741a89be35defa05bd79f4211c5a2762825</id>
<content type='text'>
No one should be writing a PAGE_SIZE worth of data to a normal sysfs
file, so properly terminate the buffer.

Thanks to Al Viro for pointing out my supidity here.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Documentation: fix minor kernel-doc warnings</title>
<updated>2006-04-02T11:59:55Z</updated>
<author>
<name>Martin Waitz</name>
<email>tali@admingilde.org</email>
</author>
<published>2006-04-02T11:59:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a580290c3e64bb695158a090d02d1232d9609311'/>
<id>urn:sha1:a580290c3e64bb695158a090d02d1232d9609311</id>
<content type='text'>
This patch updates the comments to match the actual code.

Signed-off-by: Martin Waitz &lt;tali@admingilde.org&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>BUG_ON() Conversion in fs/sysfs/</title>
<updated>2006-03-31T23:18:38Z</updated>
<author>
<name>Eric Sesterhenn</name>
<email>snakebyte@gmx.de</email>
</author>
<published>2006-03-31T23:18:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=99cee0cd7560fc4e7f3646ee18d90e328bd1cb32'/>
<id>urn:sha1:99cee0cd7560fc4e7f3646ee18d90e328bd1cb32</id>
<content type='text'>
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] Make most file operations structs in fs/ const</title>
<updated>2006-03-28T17:16:06Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@infradead.org</email>
</author>
<published>2006-03-28T09:56:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b6f5d20b04dcbc3d888555522b90ba6d36c4106'/>
<id>urn:sha1:4b6f5d20b04dcbc3d888555522b90ba6d36c4106</id>
<content type='text'>
This is a conversion to make the various file_operations structs in fs/
const.  Basically a regexp job, with a few manual fixups

The goal is both to increase correctness (harder to accidentally write to
shared datastructures) and reducing the false sharing of cachelines with
things that get dirty in .data (while .rodata is nicely read only and thus
cache clean)

Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error path</title>
<updated>2006-03-20T21:42:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-03-16T23:44:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b3229087c5e08589cea4f5040dab56f7dc11332a'/>
<id>urn:sha1:b3229087c5e08589cea4f5040dab56f7dc11332a</id>
<content type='text'>
As pointed out by Oliver Neukum.

Cc: Maneesh Soni &lt;maneesh@in.ibm.com&gt;
Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysfs: don't export dir symbols</title>
<updated>2006-03-20T21:42:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-03-16T18:23:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=832c57e9afa7a263bb2f8ee6d04d527ef6709aae'/>
<id>urn:sha1:832c57e9afa7a263bb2f8ee6d04d527ef6709aae</id>
<content type='text'>
These functions should only be used by the kobject core, and if any
driver tries to use them, bad things happen.  Unexport them to try to
prevent this from happening.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysfs: fix problem with duplicate sysfs directories and files</title>
<updated>2006-03-20T21:42:59Z</updated>
<author>
<name>Maneesh Soni</name>
<email>maneesh@in.ibm.com</email>
</author>
<published>2006-03-09T14:10:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c516865cfbac0d862d4888df91793ad1e74ffd58'/>
<id>urn:sha1:c516865cfbac0d862d4888df91793ad1e74ffd58</id>
<content type='text'>
The following patch checks for existing sysfs_dirent before
preparing new one while creating sysfs directories and files.

Signed-off-by: Maneesh Soni &lt;maneesh@in.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysfs: kzalloc conversion</title>
<updated>2006-03-20T21:42:58Z</updated>
<author>
<name>Eric Sesterhenn</name>
<email>snakebyte@gmx.de</email>
</author>
<published>2006-02-22T10:18:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58d49283b87751f7af75e021a629dcddb027e8eb'/>
<id>urn:sha1:58d49283b87751f7af75e021a629dcddb027e8eb</id>
<content type='text'>
this converts fs/sysfs to kzalloc() usage.
compile tested with make allyesconfig

Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
