kernel_optimize_test/fs/configfs
Tal Shorer 3dc3afadeb configfs: don't set buffer_needs_fill to zero if show() returns error
A confgifs attribute's show() callback is called once the first time
the user attempts to read from it. If it returns an error, that
error is returned to the user. However, the open file's
buffer_needs_fill is still set to zero and consecutive read() calls
will find an empty buffer that doesn't need filling and return 0 to
the user. This could give the user the wrong impression that the
attribute was read successfully.

Fix this by not setting buffer_needs_fill if show() returns an error,
making consecutive read() calls call show() again and either get an
error again or get data.

Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2016-07-10 21:02:18 +09:00
..
configfs_internal.h configfs: implement binary attributes 2016-01-04 12:31:46 +01:00
dir.c configfs_readdir(): make safe under shared lock 2016-05-09 11:41:13 -04:00
file.c configfs: don't set buffer_needs_fill to zero if show() returns error 2016-07-10 21:02:18 +09:00
inode.c parallel lookups: actual switch to rwsem 2016-05-02 19:49:28 -04:00
item.c configfs: switch ->default groups to a linked list 2016-03-06 16:11:24 +01:00
Kconfig configfs: change depends -> select SYSFS 2011-01-16 21:22:29 +00:00
Makefile
mount.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00