summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-01 23:41:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 20:02:04 +0200
commitaea585ef8fa6516395022e9d2fed6ec5014128bc (patch)
treebc048cbe87bf5ed3400bb62eccc28a76c8878914 /usr
parentsysfs: remove unused sysfs_buffer->pos (diff)
downloadlinux-aea585ef8fa6516395022e9d2fed6ec5014128bc.tar.xz
linux-aea585ef8fa6516395022e9d2fed6ec5014128bc.zip
sysfs: remove sysfs_buffer->needs_read_fill
->needs_read_fill is used to implement the following behaviors. 1. Ensure buffer filling on the first read. 2. Force buffer filling after a write. 3. Force buffer filling after a successful poll. However, #2 and #3 don't really work as sysfs doesn't reset file position. While the read buffer would be refilled, the next read would continue from the position after the last read or write, requiring an explicit seek to the start for it to be useful, which makes ->needs_read_fill superflous as read buffer is always refilled if f_pos == 0. Update sysfs_read_file() to test buffer->page for #1 instead and remove ->needs_read_fill. While this changes behavior in extreme corner cases - e.g. re-reading a sysfs file after seeking to non-zero position after a write or poll, it's highly unlikely to lead to actual breakage. This change is to prepare for using seq_file in the read path. While at it, reformat a comment in fill_write_buffer(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions