aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-07-01 05:03:23 -0400
committerIlya Dryomov <idryomov@gmail.com>2015-09-08 16:14:28 -0400
commita341d4df87487ae68189e0be869c39a2b0cb9aaa (patch)
tree8001abb1feb458a9e4ecf873e4cf592d9199914b /fs/ceph/addr.c
parent48fec5d0a504dfbb302cb1dd24ebb0b82a46cce9 (diff)
ceph: invalidate dirty pages after forced umount
After forced umount, ceph_writepages_start() skips flushing dirty pages. To make sure inode's reference count get dropped to zero, we need to invalidate dirty pages. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 1594f2c590bd..98933350331c 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -719,6 +719,8 @@ static int ceph_writepages_start(struct address_space *mapping,
719 719
720 if (ACCESS_ONCE(fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) { 720 if (ACCESS_ONCE(fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) {
721 pr_warn("writepage_start %p on forced umount\n", inode); 721 pr_warn("writepage_start %p on forced umount\n", inode);
722 truncate_pagecache(inode, 0);
723 mapping_set_error(mapping, -EIO);
722 return -EIO; /* we're in a forced umount, don't write! */ 724 return -EIO; /* we're in a forced umount, don't write! */
723 } 725 }
724 if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize) 726 if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize)