vfs: wrap write f_ops with file_{start,end}_write()
authorAmir Goldstein <amir73il@gmail.com>
Tue, 31 Jan 2017 08:34:57 +0000 (10:34 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 7 Feb 2017 14:05:04 +0000 (15:05 +0100)
commitbfe219d373cadab761373aeea4c70406bc27ea2c
tree781b1664565d45394b4272cc783932b857de67cf
parent11cbfb10775aa2a01cee966d118049ede9d0bdf2
vfs: wrap write f_ops with file_{start,end}_write()

Before calling write f_ops, call file_start_write() instead
of sb_start_write().

Replace {sb,file}_start_write() for {copy,clone}_file_range() and
for fallocate().

Beyond correct semantics, this avoids freeze protection to sb when
operating on special inodes, such as fallocate() on a blockdev.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/open.c
fs/read_write.c
include/linux/fs.h