OSDN Git Service

ceph: try getting buffer capability for readahead/fadvise
authorYan, Zheng <zyan@redhat.com>
Tue, 25 Oct 2016 02:51:55 +0000 (10:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2017 05:47:55 +0000 (07:47 +0200)
commite99b0ea39354cf308423588df5daf69c42dbd735
tree49bfc2c494d1e74f864dd58831e28891a81475b8
parent1bf9bc48133851121d92f0cc908bb5a1446aeba5
ceph: try getting buffer capability for readahead/fadvise

commit 2b1ac852eb67a6e95595e576371d23519105559f upstream.

For readahead/fadvise cases, caller of ceph_readpages does not
hold buffer capability. Pages can be added to page cache while
there is no buffer capability. This can cause data integrity
issue.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/addr.c
fs/ceph/caps.c
fs/ceph/file.c
fs/ceph/super.h