From: Minfei Huang Date: Sat, 19 Dec 2015 02:54:59 +0000 (+0800) Subject: ceph: Avoid to propagate the invalid page point X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=458c4703aea04674f0b5f63b43cf5669a602a110;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ceph: Avoid to propagate the invalid page point The variant pagep will still get the invalid page point, although ceph fails in function ceph_update_writeable_page. To fix this issue, Assigne the page to pagep until there is no failure in function ceph_update_writeable_page. Signed-off-by: Minfei Huang Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index ce3c773726c5..6dfff0ba4d98 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1149,7 +1149,6 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, page = grab_cache_page_write_begin(mapping, index, 0); if (!page) return -ENOMEM; - *pagep = page; dout("write_begin file %p inode %p page %p %d~%d\n", file, inode, page, (int)pos, (int)len);