<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc/generic.c, branch v3.4.92</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc/generic.c?h=v3.4.92</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc/generic.c?h=v3.4.92'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-04T03:54:56Z</updated>
<entry>
<title>switch procfs to umode_t use</title>
<updated>2012-01-04T03:54:56Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-07-24T07:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d161a13f974c72fd7ff0069d39a3ae57cb5694ff'/>
<id>urn:sha1:d161a13f974c72fd7ff0069d39a3ae57cb5694ff</id>
<content type='text'>
both proc_dir_entry -&gt;mode and populating functions

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>filesystems: add set_nlink()</title>
<updated>2011-11-02T11:53:43Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-10-28T12:13:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bfe8684869601dacfcb2cd69ef8cfd9045f62170'/>
<id>urn:sha1:bfe8684869601dacfcb2cd69ef8cfd9045f62170</id>
<content type='text'>
Replace remaining direct i_nlink updates with a new set_nlink()
updater function.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Tested-by: Toshiyuki Okajima &lt;toshi.okajima@jp.fujitsu.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>proc: make struct proc_dir_entry::name a terminal array rather than a pointer</title>
<updated>2011-07-27T19:50:45Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-07-27T18:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09570f914914d2beb0db29c5a9c7344934f2fa8c'/>
<id>urn:sha1:09570f914914d2beb0db29c5a9c7344934f2fa8c</id>
<content type='text'>
Since __proc_create() appends the name it is given to the end of the PDE
structure that it allocates, there isn't a need to store a name pointer.
Instead we can just replace the name pointer with a terminal char array of
_unspecified_ length.  The compiler will simply append the string to statically
defined variables of PDE type overlapping any hole at the end of the structure
and, unlike specifying an explicitly _zero_ length array, won't give a warning
if you try to statically initialise it with a string of more than zero length.

Also, whilst we're at it:

 (1) Move namelen to end just prior to name and reduce it to a single byte
     (name shouldn't be longer than NAME_MAX).

 (2) Move pde_unload_lock two places further on so that if it's four bytes in
     size on a 64-bit machine, it won't cause an unused hole in the PDE struct.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>airo: correct proc entry creation interfaces</title>
<updated>2011-05-16T18:25:28Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-05-13T21:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=011159a0a746e03ae42d559ce5c2a70138da3129'/>
<id>urn:sha1:011159a0a746e03ae42d559ce5c2a70138da3129</id>
<content type='text'>
* use proc_mkdir_mode() instead of create_proc_entry(S_IFDIR|...),
  export proc_mkdir_mode() for that, oh well.
* don't supply S_IFREG to proc_create_data(), it's unnecessary

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>proc: make struct proc_dir_entry::namelen unsigned int</title>
<updated>2011-03-24T02:46:37Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-03-23T23:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=312ec7e50c4d3f40b3762af651d1aa79a67f556a'/>
<id>urn:sha1:312ec7e50c4d3f40b3762af651d1aa79a67f556a</id>
<content type='text'>
1. namelen is declared "unsigned short" which hints for "maybe space savings".
   Indeed in 2.4 struct proc_dir_entry looked like:

        struct proc_dir_entry {
                unsigned short low_ino;
                unsigned short namelen;

   Now, low_ino is "unsigned int", all savings were gone for a long time.
   "struct proc_dir_entry" is not that countless to worry about it's size,
   anyway.

2. converting from unsigned short to int/unsigned int can only create
   problems, we better play it safe.

Space is not really conserved, because of natural alignment for the next
field.  sizeof(struct proc_dir_entry) remains the same.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: less LOCK/UNLOCK in remove_proc_entry()</title>
<updated>2011-01-13T16:03:17Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-01-13T01:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3740a20c4fe8697cb604a7d51395d23472b1768f'/>
<id>urn:sha1:3740a20c4fe8697cb604a7d51395d23472b1768f</id>
<content type='text'>
For the common case where a proc entry is being removed and nobody is in
the process of using it, save a LOCK/UNLOCK pair.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: -&gt;low_ino cleanup</title>
<updated>2011-01-13T16:03:16Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-01-13T01:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d1b6e4eff89475785f60fa00f65da780f869f36'/>
<id>urn:sha1:6d1b6e4eff89475785f60fa00f65da780f869f36</id>
<content type='text'>
- -&gt;low_ino is write-once field -- reading it under locks is unnecessary.

- /proc/$PID stuff never reaches pde_put()/free_proc_entry() --
   PROC_DYNAMIC_FIRST check never triggers.

- in proc_get_inode(), inode number always matches proc dir entry, so
  save one parameter.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs: dcache reduce branches in lookup path</title>
<updated>2011-01-07T06:50:28Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@kernel.dk</email>
</author>
<published>2011-01-07T06:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb045adb99d9b7c562dc7fef834857f78249daa1'/>
<id>urn:sha1:fb045adb99d9b7c562dc7fef834857f78249daa1</id>
<content type='text'>
Reduce some branches and memory accesses in dcache lookup by adding dentry
flags to indicate common d_ops are set, rather than having to check them.
This saves a pointer memory access (dentry-&gt;d_op) in common path lookup
situations, and saves another pointer load and branch in cases where we
have d_op but not the particular operation.

Patched with:

git grep -E '[.&gt;]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)-&gt;d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&amp;\1, \2);/' -i

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
</content>
</entry>
<entry>
<title>fs: change d_delete semantics</title>
<updated>2011-01-07T06:50:18Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@kernel.dk</email>
</author>
<published>2011-01-07T06:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fe15ce446beb3a33583af81ffe6c9d01a75314ed'/>
<id>urn:sha1:fe15ce446beb3a33583af81ffe6c9d01a75314ed</id>
<content type='text'>
Change d_delete from a dentry deletion notification to a dentry caching
advise, more like -&gt;drop_inode. Require it to be constant and idempotent,
and not take d_lock. This is how all existing filesystems use the callback
anyway.

This makes fine grained dentry locking of dput and dentry lru scanning
much simpler.

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
</content>
</entry>
<entry>
<title>remove inode_setattr</title>
<updated>2010-08-09T20:47:37Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-06-04T09:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1025774ce411f2bd4b059ad7b53f0003569b74fa'/>
<id>urn:sha1:1025774ce411f2bd4b059ad7b53f0003569b74fa</id>
<content type='text'>
Replace inode_setattr with opencoded variants of it in all callers.  This
moves the remaining call to vmtruncate into the filesystem methods where it
can be replaced with the proper truncate sequence.

In a few cases it was obvious that we would never end up calling vmtruncate
so it was left out in the opencoded variant:

 spufs: explicitly checks for ATTR_SIZE earlier
 btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
 ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above

In addition to that ncpfs called inode_setattr with handcrafted iattrs,
which allowed to trim down the opencoded variant.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
