Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yan, Zheng and committed by
Ilya Dryomov
a341d4df 48fec5d0

+2
+2
fs/ceph/addr.c
··· 719 719 720 720 if (ACCESS_ONCE(fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) { 721 721 pr_warn("writepage_start %p on forced umount\n", inode); 722 + truncate_pagecache(inode, 0); 723 + mapping_set_error(mapping, -EIO); 722 724 return -EIO; /* we're in a forced umount, don't write! */ 723 725 } 724 726 if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize)