Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a341d4df authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

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: default avatarYan, Zheng <zyan@redhat.com>
parent 48fec5d0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -719,6 +719,8 @@ static int ceph_writepages_start(struct address_space *mapping,

	if (ACCESS_ONCE(fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) {
		pr_warn("writepage_start %p on forced umount\n", inode);
		truncate_pagecache(inode, 0);
		mapping_set_error(mapping, -EIO);
		return -EIO; /* we're in a forced umount, don't write! */
	}
	if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize)