<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/namei.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-12-07T21:14:21Z</updated>
<entry>
<title>fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called</title>
<updated>2010-12-07T21:14:21Z</updated>
<author>
<name>Lino Sanfilippo</name>
</author>
<published>2010-11-05T16:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1085ba80cd2784400a7beec3fda5099198ed01c'/>
<id>urn:sha1:b1085ba80cd2784400a7beec3fda5099198ed01c</id>
<content type='text'>
Unsetting FMODE_NONOTIFY in fsnotify_open() is too late, since fsnotify_perm()
is called before. If FMODE_NONOTIFY is set fsnotify_perm() will skip permission
checks, so a user can still disable permission checks by setting this flag
in an open() call.
This patch corrects this by unsetting the flag before fsnotify_perm is called.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>fix open/umount race</title>
<updated>2010-10-29T08:14:56Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-10-29T07:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d893f1bc2a9f0f7dcb4b433452c59f9bedac0d7d'/>
<id>urn:sha1:d893f1bc2a9f0f7dcb4b433452c59f9bedac0d7d</id>
<content type='text'>
nameidata_to_filp() drops nd-&gt;path or transfers it to opened
file.  In the former case it's a Bad Idea(tm) to do mnt_drop_write()
on nd-&gt;path.mnt, since we might race with umount and vfsmount in
question might be gone already.

Fix: don't drop it, then...  IOW, have nameidata_to_filp() grab nd-&gt;path
in case it transfers it to file and do path_drop() in callers.  After
they are through with accessing nd-&gt;path...

Reported-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: ihold()</title>
<updated>2010-10-26T01:26:11Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2010-10-23T15:11:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f'/>
<id>urn:sha1:7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f</id>
<content type='text'>
Clones an existing reference to inode; caller must already hold one.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: move permission check back into __lookup_hash</title>
<updated>2010-10-26T01:18:19Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2010-10-06T08:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81fca444001e5a41ab80ce8cf9a5734c00ec6546'/>
<id>urn:sha1:81fca444001e5a41ab80ce8cf9a5734c00ec6546</id>
<content type='text'>
The caller that didn't need it is gone.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: brlock vfsmount_lock</title>
<updated>2010-08-18T12:35:48Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99b7db7b8ffd6bb755eb0a175596421a0b581cb2'/>
<id>urn:sha1:99b7db7b8ffd6bb755eb0a175596421a0b581cb2</id>
<content type='text'>
fs: brlock vfsmount_lock

Use a brlock for the vfsmount lock. It must be taken for write whenever
modifying the mount hash or associated fields, and may be taken for read when
performing mount hash lookups.

A new lock is added for the mnt-id allocator, so it doesn't need to take
the heavy vfsmount write-lock.

The number of atomics should remain the same for fastpath rlock cases, though
code would be slightly slower due to per-cpu access. Scalability is not not be
much improved in common cases yet, due to other locks (ie. dcache_lock) getting
in the way. However path lookups crossing mountpoints should be one case where
scalability is improved (currently requiring the global lock).

The slowpath is slower due to use of brlock. On a 64 core, 64 socket, 32 node
Altix system (high latency to remote nodes), a simple umount microbenchmark
(mount --bind mnt mnt2 ; umount mnt2 loop 1000 times), before this patch it
took 6.8s, afterwards took 7.1s, about 5% slower.

Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: remove extra lookup in __lookup_hash</title>
<updated>2010-08-18T12:35:47Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b04f784e5d19ed58892833dae845738972cea260'/>
<id>urn:sha1:b04f784e5d19ed58892833dae845738972cea260</id>
<content type='text'>
fs: remove extra lookup in __lookup_hash

Optimize lookup for create operations, where no dentry should often be
common-case. In cases where it is not, such as unlink, the added overhead
is much smaller than the removed.

Also, move comments about __d_lookup racyness to the __d_lookup call site.
d_lookup is intuitive; __d_lookup is what needs commenting. So in that same
vein, add kerneldoc comments to __d_lookup and clean up some of the comments:

- We are interested in how the RCU lookup works here, particularly with
  renames. Make that explicit, and point to the document where it is explained
  in more detail.
- RCU is pretty standard now, and macros make implementations pretty mindless.
  If we want to know about RCU barrier details, we look in RCU code.
- Delete some boring legacy comments because we don't care much about how the
  code used to work, more about the interesting parts of how it works now. So
  comments about lazy LRU may be interesting, but would better be done in the
  LRU or refcount management code.

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: dentry allocation consolidation</title>
<updated>2010-08-18T12:35:45Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=baa0389073eb7beb9d36f6d13df97e16c1bfa626'/>
<id>urn:sha1:baa0389073eb7beb9d36f6d13df97e16c1bfa626</id>
<content type='text'>
fs: dentry allocation consolidation

There are 2 duplicate copies of code in dentry allocation in path lookup.
Consolidate them into a single function.

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: fix do_lookup false negative</title>
<updated>2010-08-18T12:35:45Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2010-08-17T18:37:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e2e88ea8c3bd9e1bd6e42faf047a4ac3fbb3b2f'/>
<id>urn:sha1:2e2e88ea8c3bd9e1bd6e42faf047a4ac3fbb3b2f</id>
<content type='text'>
fs: fix do_lookup false negative

In do_lookup, if we initially find no dentry, we take the directory i_mutex and
re-check the lookup. If we find a dentry there, then we revalidate it if
needed. However if that revalidate asks for the dentry to be invalidated, we
return -ENOENT from do_lookup. What should happen instead is an attempt to
allocate and lookup a new dentry.

This is probably not noticed because it is rare. It is only reached if a
concurrent create races in first (in which case, the dentry probably won't be
invalidated anyway), or if the racy __d_lookup has failed due to a
false-negative (which is very rare).

Fix this by removing code and have it use the normal reval path.

Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: add helpers to get root and pwd</title>
<updated>2010-08-11T04:28:20Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2010-08-10T09:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79'/>
<id>urn:sha1:f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79</id>
<content type='text'>
Add three helpers that retrieve a refcounted copy of the root and cwd
from the supplied fs_struct.

 get_fs_root()
 get_fs_pwd()
 get_fs_root_and_pwd()

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify</title>
<updated>2010-08-10T18:39:13Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-08-10T18:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c8946f509a494769a8c602b5ed189df01917d39'/>
<id>urn:sha1:8c8946f509a494769a8c602b5ed189df01917d39</id>
<content type='text'>
* 'for-linus' of git://git.infradead.org/users/eparis/notify: (132 commits)
  fanotify: use both marks when possible
  fsnotify: pass both the vfsmount mark and inode mark
  fsnotify: walk the inode and vfsmount lists simultaneously
  fsnotify: rework ignored mark flushing
  fsnotify: remove global fsnotify groups lists
  fsnotify: remove group-&gt;mask
  fsnotify: remove the global masks
  fsnotify: cleanup should_send_event
  fanotify: use the mark in handler functions
  audit: use the mark in handler functions
  dnotify: use the mark in handler functions
  inotify: use the mark in handler functions
  fsnotify: send fsnotify_mark to groups in event handling functions
  fsnotify: Exchange list heads instead of moving elements
  fsnotify: srcu to protect read side of inode and vfsmount locks
  fsnotify: use an explicit flag to indicate fsnotify_destroy_mark has been called
  fsnotify: use _rcu functions for mark list traversal
  fsnotify: place marks on object in order of group memory address
  vfs/fsnotify: fsnotify_close can delay the final work in fput
  fsnotify: store struct file not struct path
  ...

Fix up trivial delete/modify conflict in fs/notify/inotify/inotify.c.
</content>
</entry>
</feed>
