<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/read_write.c, branch v3.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-07-26T16:57:09Z</updated>
<entry>
<title>fs: add missing unlock in default_llseek()</title>
<updated>2011-07-26T16:57:09Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-07-26T14:25:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bacb2d816c77edefd464d6bcc04c07f92109bd7d'/>
<id>urn:sha1:bacb2d816c77edefd464d6bcc04c07f92109bd7d</id>
<content type='text'>
A recent change in linux-next, 982d816581 "fs: add SEEK_HOLE and
SEEK_DATA flags" added some direct returns on error, but it should
have been a goto out.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: add SEEK_HOLE and SEEK_DATA flags</title>
<updated>2011-07-21T00:47:56Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2011-07-18T17:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=982d816581eeeacfe5b2b7c6d47d13a157616eff'/>
<id>urn:sha1:982d816581eeeacfe5b2b7c6d47d13a157616eff</id>
<content type='text'>
This just gets us ready to support the SEEK_HOLE and SEEK_DATA flags.  Turns out
using fiemap in things like cp cause more problems than it solves, so lets try
and give userspace an interface that doesn't suck.  We need to match solaris
here, and the definitions are

*o* If /whence/ is SEEK_HOLE, the offset of the start of the
next hole greater than or equal to the supplied offset
is returned. The definition of a hole is provided near
the end of the DESCRIPTION.

*o* If /whence/ is SEEK_DATA, the file pointer is set to the
start of the next non-hole file region greater than or
equal to the supplied offset.

So in the generic case the entire file is data and there is a virtual hole at
the end.  That means we will just return i_size for SEEK_HOLE and will return
the same offset for SEEK_DATA.  This is how Solaris does it so we have to do it
the same way.

Thanks,

Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fix signedness mess in rw_verify_area() on 64bit architectures</title>
<updated>2011-01-13T01:06:58Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-12-17T12:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cccb5a1e698535fa5a734ffe21c7061c97f8d8c5'/>
<id>urn:sha1:cccb5a1e698535fa5a734ffe21c7061c97f8d8c5</id>
<content type='text'>
... and clean the unsigned-f_pos code, while we are at it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>BKL: remove extraneous #include &lt;smp_lock.h&gt;</title>
<updated>2010-11-17T16:59:32Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-11-17T15:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=451a3c24b0135bce54542009b5fde43846c7cf67'/>
<id>urn:sha1:451a3c24b0135bce54542009b5fde43846c7cf67</id>
<content type='text'>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>readv/writev: do the same MAX_RW_COUNT truncation that read/write does</title>
<updated>2010-10-29T17:36:49Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-29T17:36:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=435f49a518c78eec8e2edbbadd912737246cbe20'/>
<id>urn:sha1:435f49a518c78eec8e2edbbadd912737246cbe20</id>
<content type='text'>
We used to protect against overflow, but rather than return an error, do
what read/write does, namely to limit the total size to MAX_RW_COUNT.
This is not only more consistent, but it also means that any broken
low-level read/write routine that still keeps counts in 'int' can't
break.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>vfs: introduce FMODE_UNSIGNED_OFFSET for allowing negative f_pos</title>
<updated>2010-10-26T01:18:21Z</updated>
<author>
<name>KAMEZAWA Hiroyuki</name>
<email>kamezawa.hiroyu@jp.fujitsu.com</email>
</author>
<published>2010-10-01T21:20:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a3956c790290efeb647bbb0c3a90476bb57800e'/>
<id>urn:sha1:4a3956c790290efeb647bbb0c3a90476bb57800e</id>
<content type='text'>
Now, rw_verify_area() checsk f_pos is negative or not.  And if negative,
returns -EINVAL.

But, some special files as /dev/(k)mem and /proc/&lt;pid&gt;/mem etc..  has
negative offsets.  And we can't do any access via read/write to the
file(device).

So introduce FMODE_UNSIGNED_OFFSET to allow negative file offsets.

Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: make no_llseek the default</title>
<updated>2010-10-15T13:53:46Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-07-07T21:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=776c163b1b93c8dfa5edba885bc2bfbc2d228a5f'/>
<id>urn:sha1:776c163b1b93c8dfa5edba885bc2bfbc2d228a5f</id>
<content type='text'>
All file operations now have an explicit .llseek
operation pointer, so we can change the default
action for future code.

This makes changes the default from default_llseek
to no_llseek, which always returns -ESPIPE if
a user tries to seek on a file without a .llseek
operation.

The name of the default_llseek function remains
unchanged, if anyone thinks we should change it,
please speak up.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
</content>
</entry>
<entry>
<title>vfs: don't use BKL in default_llseek</title>
<updated>2010-10-15T13:53:34Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-07-07T20:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab91261f5c43f196ec7ff1d113847b87b7606b26'/>
<id>urn:sha1:ab91261f5c43f196ec7ff1d113847b87b7606b26</id>
<content type='text'>
There are currently 191 users of default_llseek.
Nine of these are in device drivers that use the
big kernel lock. None of these ever touch
file-&gt;f_pos outside of llseek or file_pos_write.

Consequently, we never rely on the BKL
in the default_llseek function and can
replace that with i_mutex, which is also
used in generic_file_llseek.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>fsnotify: pass a file instead of an inode to open, read, and write</title>
<updated>2010-07-28T13:58:32Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2009-12-18T02:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a12a9d7814631e918dec93abad856e692d5286d'/>
<id>urn:sha1:2a12a9d7814631e918dec93abad856e692d5286d</id>
<content type='text'>
fanotify, the upcoming notification system actually needs a struct path so it can
do opens in the context of listeners, and it needs a file so it can get f_flags
from the original process.  Close was the only operation that already was passing
a struct file to the notification hook.  This patch passes a file for access,
modify, and open as well as they are easily available to these hooks.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfs: introduce noop_llseek()</title>
<updated>2010-05-27T16:12:56Z</updated>
<author>
<name>jan Blunck</name>
<email>jblunck@suse.de</email>
</author>
<published>2010-05-26T21:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae6afc3f5cf53fb97bac2d0a209bb465952742e7'/>
<id>urn:sha1:ae6afc3f5cf53fb97bac2d0a209bb465952742e7</id>
<content type='text'>
This is an implementation of -&gt;llseek useable for the rare special case
when userspace expects the seek to succeed but the (device) file is
actually not able to perform the seek.  In this case you use noop_llseek()
instead of falling back to the default implementation of -&gt;llseek.

Signed-off-by: Jan Blunck &lt;jblunck@suse.de&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&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>
</feed>
