<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/fuse/dir.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-07-03T09:18:45Z</updated>
<entry>
<title>fuse: atomic_o_trunc should truncate pagecache</title>
<updated>2018-07-03T09:18:45Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2018-02-08T14:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7863da30c256f3691963e8d41f760faaf2cb83aa'/>
<id>urn:sha1:7863da30c256f3691963e8d41f760faaf2cb83aa</id>
<content type='text'>
commit df0e91d488276086bc07da2e389986cae0048c37 upstream.

Fuse has an "atomic_o_trunc" mode, where userspace filesystem uses the
O_TRUNC flag in the OPEN request to truncate the file atomically with the
open.

In this mode there's no need to send a SETATTR request to userspace after
the open, so fuse_do_setattr() checks this mode and returns.  But this
misses the important step of truncating the pagecache.

Add the missing parts of truncation to the ATTR_OPEN branch.

Reported-by: Chad Austin &lt;chadaustin@fb.com&gt;
Fixes: 6ff958edbf39 ("fuse: add atomic open+truncate support")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: fix READDIRPLUS skipping an entry</title>
<updated>2017-11-02T08:36:48Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2017-10-25T14:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7be20b0175f4d148a06224df0324b5810aadb99'/>
<id>urn:sha1:b7be20b0175f4d148a06224df0324b5810aadb99</id>
<content type='text'>
commit c6cdd51404b7ac12dd95173ddfc548c59ecf037f upstream.

Marios Titas running a Haskell program noticed a problem with fuse's
readdirplus: when it is interrupted by a signal, it skips one directory
entry.

The reason is that fuse erronously updates ctx-&gt;pos after a failed
dir_emit().

The issue originates from the patch adding readdirplus support.

Reported-by: Jakob Unterwurzacher &lt;jakobunt@gmail.com&gt;
Tested-by: Marios Titas &lt;redneb@gmx.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 0b05b18381ee ("fuse: implement NFS-like readdirplus support")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: Propagate dentry down to inode_change_ok()</title>
<updated>2016-12-23T14:42:19Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-12-14T12:24:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33b52836b538a87686c80fa504ae538b6dd15e65'/>
<id>urn:sha1:33b52836b538a87686c80fa504ae538b6dd15e65</id>
<content type='text'>
[ Upstream commit 62490330769c1ce5dcba3f1f3e8f4005e9b797e6 ]

To avoid clearing of capabilities or security related extended
attributes too early, inode_change_ok() will need to take dentry instead
of inode. Propagate it down to fuse_do_setattr().

Acked-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>vfs: Make d_invalidate return void</title>
<updated>2014-10-09T06:38:57Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2014-02-13T17:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5542aa2fa7f6cddb03c4ac3135e390adffda98ca'/>
<id>urn:sha1:5542aa2fa7f6cddb03c4ac3135e390adffda98ca</id>
<content type='text'>
Now that d_invalidate can no longer fail, stop returning a useless
return code.  For the few callers that checked the return code update
remove the handling of d_invalidate failure.

Reviewed-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: Remove unnecessary calls of check_submounts_and_drop</title>
<updated>2014-10-09T06:38:56Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2014-02-13T17:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b053f3207e8887fed88162a339fdd4001abcdb2'/>
<id>urn:sha1:9b053f3207e8887fed88162a339fdd4001abcdb2</id>
<content type='text'>
Now that check_submounts_and_drop can not fail and is called from
d_invalidate there is no longer a need to call check_submounts_and_drom
from filesystem d_revalidate methods so remove it.

Reviewed-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: call rename2 if exists</title>
<updated>2014-08-07T18:40:09Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-07-23T13:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7177a9c4b509eb357cc450256bc3cf39f1a1e639'/>
<id>urn:sha1:7177a9c4b509eb357cc450256bc3cf39f1a1e639</id>
<content type='text'>
Christoph Hellwig suggests:

1) make vfs_rename call -&gt;rename2 if it exists instead of -&gt;rename
2) switch all filesystems that you're adding NOREPLACE support for to
   use -&gt;rename2
3) see how many -&gt;rename instances we'll have left after a few
   iterations of 2.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
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>fuse: restructure -&gt;rename2()</title>
<updated>2014-07-10T08:50:19Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-07-10T08:50:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4237ba43b65aa989674c89fc4f2fe46eebc501ee'/>
<id>urn:sha1:4237ba43b65aa989674c89fc4f2fe46eebc501ee</id>
<content type='text'>
Make -&gt;rename2() universal, i.e. able to handle zero flags.  This is to
make future change of the API easier.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: ignore entry-timeout on LOOKUP_REVAL</title>
<updated>2014-07-07T13:28:51Z</updated>
<author>
<name>Anand Avati</name>
</author>
<published>2014-06-27T00:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=154210ccb3a871e631bf39fdeb7a8731d98af87b'/>
<id>urn:sha1:154210ccb3a871e631bf39fdeb7a8731d98af87b</id>
<content type='text'>
The following test case demonstrates the bug:

  sh# mount -t glusterfs localhost:meta-test /mnt/one

  sh# mount -t glusterfs localhost:meta-test /mnt/two

  sh# echo stuff &gt; /mnt/one/file; rm -f /mnt/two/file; echo stuff &gt; /mnt/one/file
  bash: /mnt/one/file: Stale file handle

  sh# echo stuff &gt; /mnt/one/file; rm -f /mnt/two/file; sleep 1; echo stuff &gt; /mnt/one/file

On the second open() on /mnt/one, FUSE would have used the old
nodeid (file handle) trying to re-open it. Gluster is returning
-ESTALE. The ESTALE propagates back to namei.c:filename_lookup()
where lookup is re-attempted with LOOKUP_REVAL. The right
behavior now, would be for FUSE to ignore the entry-timeout and
and do the up-call revalidation. Instead FUSE is ignoring
LOOKUP_REVAL, succeeding the revalidation (because entry-timeout
has not passed), and open() is again retried on the old file
handle and finally the ESTALE is going back to the application.

Fix: if revalidation is happening with LOOKUP_REVAL, then ignore
entry-timeout and always do the up-call.

Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>fuse: timeout comparison fix</title>
<updated>2014-07-07T13:28:50Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-07-07T13:28:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=126b9d4365b110c157bc4cbc32540dfa66c9c85a'/>
<id>urn:sha1:126b9d4365b110c157bc4cbc32540dfa66c9c85a</id>
<content type='text'>
As suggested by checkpatch.pl, use time_before64() instead of direct
comparison of jiffies64 values.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>fuse: add renameat2 support</title>
<updated>2014-04-28T14:43:44Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2014-04-28T14:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1560c974dcd40a8d3f193283acd7cc6aee13dc13'/>
<id>urn:sha1:1560c974dcd40a8d3f193283acd7cc6aee13dc13</id>
<content type='text'>
Support RENAME_EXCHANGE and RENAME_NOREPLACE flags on the userspace ABI.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
</feed>
