diff options
author | Minfei Huang <mnfhuang@gmail.com> | 2015-12-18 21:54:59 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-01-21 13:36:07 -0500 |
commit | 458c4703aea04674f0b5f63b43cf5669a602a110 (patch) | |
tree | bb59f6a36aa562f331296762625518ff5888d668 /fs/ceph | |
parent | f9cac5ac08b630c87c56671ce99a80310cffb2c6 (diff) |
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 <mnfhuang@gmail.com>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 1 |
1 files changed, 0 insertions, 1 deletions
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, | |||
1149 | page = grab_cache_page_write_begin(mapping, index, 0); | 1149 | page = grab_cache_page_write_begin(mapping, index, 0); |
1150 | if (!page) | 1150 | if (!page) |
1151 | return -ENOMEM; | 1151 | return -ENOMEM; |
1152 | *pagep = page; | ||
1153 | 1152 | ||
1154 | dout("write_begin file %p inode %p page %p %d~%d\n", file, | 1153 | dout("write_begin file %p inode %p page %p %d~%d\n", file, |
1155 | inode, page, (int)pos, (int)len); | 1154 | inode, page, (int)pos, (int)len); |