<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.15</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.15</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.15'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-06-07T22:12:18Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2014-06-07T22:12:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-07T22:12:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c593e8978722f7f4a12932733cfeed6c0c74fbaa'/>
<id>urn:sha1:c593e8978722f7f4a12932733cfeed6c0c74fbaa</id>
<content type='text'>
Pull btrfs fix from Chris Mason:
 "I had this in my 3.16 merge window queue, but it is small and obvious
  enough for 3.15.  I cherry-picked and retested against current rc8"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: send, fix corrupted path strings for long paths
</content>
</entry>
<entry>
<title>mm: add !pte_present() check on existing hugetlb_entry callbacks</title>
<updated>2014-06-06T20:21:16Z</updated>
<author>
<name>Naoya Horiguchi</name>
<email>n-horiguchi@ah.jp.nec.com</email>
</author>
<published>2014-06-06T14:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4c54919ed86302094c0ca7d48a8cbd4ee753e92'/>
<id>urn:sha1:d4c54919ed86302094c0ca7d48a8cbd4ee753e92</id>
<content type='text'>
The age table walker doesn't check non-present hugetlb entry in common
path, so hugetlb_entry() callbacks must check it.  The reason for this
behavior is that some callers want to handle it in its own way.

[ I think that reason is bogus, btw - it should just do what the regular
  code does, which is to call the "pte_hole()" function for such hugetlb
  entries  - Linus]

However, some callers don't check it now, which causes unpredictable
result, for example when we have a race between migrating hugepage and
reading /proc/pid/numa_maps.  This patch fixes it by adding !pte_present
checks on buggy callbacks.

This bug exists for years and got visible by introducing hugepage
migration.

ChangeLog v2:
- fix if condition (check !pte_present() instead of pte_present())

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.com&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; [3.12+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
[ Backported to 3.15.  Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt; ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Btrfs: send, fix corrupted path strings for long paths</title>
<updated>2014-06-06T19:00:46Z</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@gmail.com</email>
</author>
<published>2014-05-21T16:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=01a9a8a9e20012f5676ec9cd16b6aed08b267066'/>
<id>urn:sha1:01a9a8a9e20012f5676ec9cd16b6aed08b267066</id>
<content type='text'>
If a path has more than 230 characters, we allocate a new buffer to
use for the path, but we were forgotting to copy the contents of the
previous buffer into the new one, which has random content from the
kmalloc call.

Test:

    mkfs.btrfs -f /dev/sdd
    mount /dev/sdd /mnt

    TEST_PATH="/mnt/fdmanana/.config/google-chrome-mysetup/Default/Pepper_Data/Shockwave_Flash/WritableRoot/#SharedObjects/JSHJ4ZKN/s.wsj.net/[[IMPORT]]/players.edgesuite.net/flash/plugins/osmf/advanced-streaming-plugin/v2.7/osmf1.6/Ak#"
    mkdir -p $TEST_PATH
    echo "hello world" &gt; $TEST_PATH/amaiAdvancedStreamingPlugin.txt

    btrfs subvolume snapshot -r /mnt /mnt/mysnap1
    btrfs send /mnt/mysnap1 -f /tmp/1.snap

A test for xfstests follows.

Signed-off-by: Filipe David Borba Manana &lt;fdmanana@gmail.com&gt;
Cc: Marc Merlin &lt;marc@merlins.org&gt;
Tested-by: Marc MERLIN &lt;marc@merlins.org&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>kernfs: move the last knowledge of sysfs out from kernfs</title>
<updated>2014-06-03T15:11:18Z</updated>
<author>
<name>Jianyu Zhan</name>
<email>nasa4836@gmail.com</email>
</author>
<published>2014-04-26T07:40:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c9482a5bdcc09be9096f40e858c5fe39c389cd52'/>
<id>urn:sha1:c9482a5bdcc09be9096f40e858c5fe39c389cd52</id>
<content type='text'>
There is still one residue of sysfs remaining: the sb_magic
SYSFS_MAGIC. However this should be kernfs user specific,
so this patch moves it out. Kerrnfs user should specify their
magic number while mouting.

Signed-off-by: Jianyu Zhan &lt;nasa4836@gmail.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dcache: add missing lockdep annotation</title>
<updated>2014-05-31T16:13:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-05-31T16:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9f12600fe425bc28f0ccba034a77783c09c15af4'/>
<id>urn:sha1:9f12600fe425bc28f0ccba034a77783c09c15af4</id>
<content type='text'>
lock_parent() very much on purpose does nested locking of dentries, and
is careful to maintain the right order (lock parent first).  But because
it didn't annotate the nested locking order, lockdep thought it might be
a deadlock on d_lock, and complained.

Add the proper annotation for the inner locking of the child dentry to
make lockdep happy.

Introduced by commit 046b961b45f9 ("shrink_dentry_list(): take parent's
-&gt;d_lock earlier").

Reported-and-tested-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dentry_kill() doesn't need the second argument now</title>
<updated>2014-05-30T15:10:33Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-05-29T13:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cbf74da435d1bd13dbb790f94c7ff67b2fb6af4'/>
<id>urn:sha1:8cbf74da435d1bd13dbb790f94c7ff67b2fb6af4</id>
<content type='text'>
it's 1 in the only remaining caller.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>dealing with the rest of shrink_dentry_list() livelock</title>
<updated>2014-05-30T15:10:33Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-05-29T13:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2b80195d8829921506880f6dccd21cabd163d0d'/>
<id>urn:sha1:b2b80195d8829921506880f6dccd21cabd163d0d</id>
<content type='text'>
We have the same problem with -&gt;d_lock order in the inner loop, where
we are dropping references to ancestors.  Same solution, basically -
instead of using dentry_kill() we use lock_parent() (introduced in the
previous commit) to get that lock in a safe way, recheck -&gt;d_count
(in case if lock_parent() has ended up dropping and retaking -&gt;d_lock
and somebody managed to grab a reference during that window), trylock
the inode-&gt;i_lock and use __dentry_kill() to do the rest.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>shrink_dentry_list(): take parent's -&gt;d_lock earlier</title>
<updated>2014-05-30T15:03:21Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-05-29T12:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=046b961b45f93a92e4c70525a12f3d378bced130'/>
<id>urn:sha1:046b961b45f93a92e4c70525a12f3d378bced130</id>
<content type='text'>
The cause of livelocks there is that we are taking -&gt;d_lock on
dentry and its parent in the wrong order, forcing us to use
trylock on the parent's one.  d_walk() takes them in the right
order, and unfortunately it's not hard to create a situation
when shrink_dentry_list() can't make progress since trylock
keeps failing, and shrink_dcache_parent() or check_submounts_and_drop()
keeps calling d_walk() disrupting the very shrink_dentry_list() it's
waiting for.

Solution is straightforward - if that trylock fails, let's unlock
the dentry itself and take locks in the right order.  We need to
stabilize -&gt;d_parent without holding -&gt;d_lock, but that's doable
using RCU.  And we'd better do that in the very beginning of the
loop in shrink_dentry_list(), since the checks on refcount, etc.
would need to be redone anyway.

That deals with a half of the problem - killing dentries on the
shrink list itself.  Another one (dropping their parents) is
in the next commit.

locking parent is interesting - it would be easy to do rcu_read_lock(),
lock whatever we think is a parent, lock dentry itself and check
if the parent is still the right one.  Except that we need to check
that *before* locking the dentry, or we are risking taking -&gt;d_lock
out of order.  Fortunately, once the D1 is locked, we can check if
D2-&gt;d_parent is equal to D1 without the need to lock D2; D2-&gt;d_parent
can start or stop pointing to D1 only under D1-&gt;d_lock, so taking
D1-&gt;d_lock is enough.  In other words, the right solution is
rcu_read_lock/lock what looks like parent right now/check if it's
still our parent/rcu_read_unlock/lock the child.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>expand dentry_kill(dentry, 0) in shrink_dentry_list()</title>
<updated>2014-05-29T12:50:08Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-05-28T17:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff2fde9929feb2aef45377ce56b8b12df85dda69'/>
<id>urn:sha1:ff2fde9929feb2aef45377ce56b8b12df85dda69</id>
<content type='text'>
Result will be massaged to saner shape in the next commits.  It is
ugly, no questions - the point of that one is to be a provably
equivalent transformation (and it might be worth splitting a bit
more).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>split dentry_kill()</title>
<updated>2014-05-29T12:46:08Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-05-28T17:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e55fd011549eae01a230e3cace6f4d031b6a3453'/>
<id>urn:sha1:e55fd011549eae01a230e3cace6f4d031b6a3453</id>
<content type='text'>
... into trylocks and everything else.  The latter (actual killing)
is __dentry_kill().

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