<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/kernfs/inode.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-04-27T00:19:04Z</updated>
<entry>
<title>kernfs: protect lazy kernfs_iattrs allocation with mutex</title>
<updated>2014-04-27T00:19:04Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2014-04-02T20:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29b311867df2f1f7aee9ec42517becbbb4aeeeef'/>
<id>urn:sha1:29b311867df2f1f7aee9ec42517becbbb4aeeeef</id>
<content type='text'>
commit 4afddd60a770560d370d6f85c5aef57c16bf7502 upstream.

kernfs_iattrs is allocated lazily when operations which require it
take place; unfortunately, the lazy allocation and returning weren't
properly synchronized and when there are multiple concurrent
operations, it might end up returning kernfs_iattrs which hasn't
finished initialization yet or different copies to different callers.

Fix it by synchronizing with a mutex.  This can be smarter with memory
barriers but let's go there if it actually turns out to be necessary.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Link: http://lkml.kernel.org/g/533ABA32.9080602@oracle.com
Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kernfs: s/sysfs/kernfs/ in internal functions and whatever is left</title>
<updated>2013-12-12T01:39:20Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c637b8acbe079edb477d887041755b489036f146'/>
<id>urn:sha1:c637b8acbe079edb477d887041755b489036f146</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

This patch performs the following renames.

* s/sysfs_*()/kernfs_*()/ in all internal functions
* s/sysfs/kernfs/ in internal strings, comments and whatever is remaining
* Uniformly rename various vfs operations so that they're consistently
  named and distinguishable.

This patch is strictly rename only and doesn't introduce any
functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: s/sysfs/kernfs/ in global variables</title>
<updated>2013-12-12T01:39:20Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a797bfc30532388e8a11ca726df60cdd77aa8675'/>
<id>urn:sha1:a797bfc30532388e8a11ca726df60cdd77aa8675</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

This patch performs the following renames.

* s/sysfs_mutex/kernfs_mutex/
* s/sysfs_dentry_ops/kernfs_dops/
* s/sysfs_dir_operations/kernfs_dir_fops/
* s/sysfs_dir_inode_operations/kernfs_dir_iops/
* s/kernfs_file_operations/kernfs_file_fops/ - renamed for consistency
* s/sysfs_symlink_inode_operations/kernfs_symlink_iops/
* s/sysfs_aops/kernfs_aops/
* s/sysfs_backing_dev_info/kernfs_bdi/
* s/sysfs_inode_operations/kernfs_iops/
* s/sysfs_dir_cachep/kernfs_node_cache/
* s/sysfs_ops/kernfs_sops/

This patch is strictly rename only and doesn't introduce any
functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: s/sysfs/kernfs/ in constants</title>
<updated>2013-12-12T01:39:20Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df23fc39bce03bb26e63bea57fc5f5bf6882d74b'/>
<id>urn:sha1:df23fc39bce03bb26e63bea57fc5f5bf6882d74b</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

This patch performs the following renames.

* s/SYSFS_DIR/KERNFS_DIR/
* s/SYSFS_KOBJ_ATTR/KERNFS_FILE/
* s/SYSFS_KOBJ_LINK/KERNFS_LINK/
* s/SYSFS_{TYPE_FLAGS}/KERNFS_{TYPE_FLAGS}/
* s/SYSFS_FLAG_{FLAG}/KERNFS_{FLAG}/
* s/sysfs_type()/kernfs_type()/
* s/SD_DEACTIVATED_BIAS/KN_DEACTIVATED_BIAS/

This patch is strictly rename only and doesn't introduce any
functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: s/sysfs/kernfs/ in various data structures</title>
<updated>2013-12-12T01:39:20Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c525aaddc366df23eb095d58a2bdf11cce62a98b'/>
<id>urn:sha1:c525aaddc366df23eb095d58a2bdf11cce62a98b</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

This patch performs the following renames.

* s/sysfs_open_dirent/kernfs_open_node/
* s/sysfs_open_file/kernfs_open_file/
* s/sysfs_inode_attrs/kernfs_iattrs/
* s/sysfs_addrm_cxt/kernfs_addrm_cxt/
* s/sysfs_super_info/kernfs_super_info/
* s/sysfs_info()/kernfs_info()/
* s/sysfs_open_dirent_lock/kernfs_open_node_lock/
* s/sysfs_open_file_mutex/kernfs_open_file_mutex/
* s/sysfs_of()/kernfs_of()/

This patch is strictly rename only and doesn't introduce any
functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: drop s_ prefix from kernfs_node members</title>
<updated>2013-12-11T23:43:48Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adc5e8b58f4886d45f79f4ff41a09001a76a6b12'/>
<id>urn:sha1:adc5e8b58f4886d45f79f4ff41a09001a76a6b12</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

s_ prefix for kernfs members is used inconsistently and a misnomer
now.  It's not like kernfs_node is used widely across the kernel
making the ability to grep for the members particularly useful.  Let's
just drop the prefix.

This patch is strictly rename only and doesn't introduce any
functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly</title>
<updated>2013-12-11T23:28:36Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-12-11T19:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=324a56e16e44baecac3ca799fd216154145c14bf'/>
<id>urn:sha1:324a56e16e44baecac3ca799fd216154145c14bf</id>
<content type='text'>
kernfs has just been separated out from sysfs and we're already in
full conflict mode.  Nothing can make the situation any worse.  Let's
take the chance to name things properly.

This patch performs the following renames.

* s/sysfs_elem_dir/kernfs_elem_dir/
* s/sysfs_elem_symlink/kernfs_elem_symlink/
* s/sysfs_elem_attr/kernfs_elem_file/
* s/sysfs_dirent/kernfs_node/
* s/sd/kn/ in kernfs proper
* s/parent_sd/parent/
* s/target_sd/target/
* s/dir_sd/parent/
* s/to_sysfs_dirent()/rb_to_kn()/
* misc renames of local vars when they conflict with the above

Because md, mic and gpio dig into sysfs details, this patch ends up
modifying them.  All are sysfs_dirent renames and trivial.  While we
can avoid these by introducing a dummy wrapping struct sysfs_dirent
around kernfs_node, given the limited usage outside kernfs and sysfs
proper, I don't think such workaround is called for.

This patch is strictly rename only and doesn't introduce any
functional difference.

- mic / gpio renames were missing.  Spotted by kbuild test robot.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Ashutosh Dixit &lt;ashutosh.dixit@intel.com&gt;
Cc: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: implement "trusted.*" xattr support</title>
<updated>2013-12-04T15:34:45Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-11-23T22:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2322392b020badfe49730f1529b9c1a15248c387'/>
<id>urn:sha1:2322392b020badfe49730f1529b9c1a15248c387</id>
<content type='text'>
kernfs inherited "security.*" xattr support from sysfs.  This patch
extends xattr support to "trusted.*" using simple_xattr_*().  As
trusted xattrs are restricted to CAP_SYS_ADMIN, simple_xattr_*() which
uses kernel memory for storage shouldn't be problematic.

Note that the existing "security.*" support doesn't implement
get/remove/list and the this patch only implements those ops for
"trusted.*".  We probably want to extend those ops to include support
for "security.*".

This patch will allow using kernfs from cgroup which requires
"trusted.*" xattr support.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: David P. Quigley &lt;dpquigl@tycho.nsa.gov&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernfs: update sysfs_init_inode_attrs()</title>
<updated>2013-12-04T15:34:45Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-11-23T22:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a8049affd55a2c857a89faece27b878416fbf91'/>
<id>urn:sha1:9a8049affd55a2c857a89faece27b878416fbf91</id>
<content type='text'>
sysfs_init_inode_attrs() is a bit clumsy to use requiring the caller
to check whether @sd-&gt;s_iattr is already set or not.  Rename it to
sysfs_inode_attrs(), update it to check whether @sd-&gt;s_iattr is
already initialized before trying to initialize it and return
@sd-&gt;s_iattr.  This simplifies the callers.

While at it,

* Rename struct sysfs_inode_attrs pointer variables to "attrs".  As
  kernfs no longer deals with "struct attribute", this isn't confusing
  and makes it easier to distinguish from struct iattr pointers.

* A new field will be added to sysfs_inode_attrs.  Reindent in
  preparation.

This patch doesn't introduce any behavior changes.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sysfs, kernfs: prepare mount path for kernfs</title>
<updated>2013-11-30T02:16:08Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2013-11-28T19:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b93dc9b1c684d0587fe44d36bbfdf45bd3bea9d'/>
<id>urn:sha1:4b93dc9b1c684d0587fe44d36bbfdf45bd3bea9d</id>
<content type='text'>
We're in the process of separating out core sysfs functionality into
kernfs which will deal with sysfs_dirents directly.  This patch
rearranges mount path so that the kernfs and sysfs parts are separate.

* As sysfs_super_info won't be visible outside kernfs proper,
  kernfs_super_ns() is added to allow kernfs users to access a
  super_block's namespace tag.

* Generic mount operation is separated out into kernfs_mount_ns().
  sysfs_mount() now just performs sysfs-specific permission check,
  acquires namespace tag, and invokes kernfs_mount_ns().

* Generic superblock release is separated out into kernfs_kill_sb()
  which can be used directly as file_system_type-&gt;kill_sb().  As sysfs
  needs to put the namespace tag, sysfs_kill_sb() wraps
  kernfs_kill_sb() with ns tag put.

* sysfs_dir_cachep init and sysfs_inode_init() are separated out into
  kernfs_init().  kernfs_init() uses only small amount of memory and
  trying to handle and propagate kernfs_init() failure doesn't make
  much sense.  Use SLAB_PANIC for sysfs_dir_cachep and make
  sysfs_inode_init() panic on failure.

  After this change, kernfs_init() should be called before
  sysfs_init(), fs/namespace.c::mnt_init() modified accordingly.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: linux-fsdevel@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
