diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-07-01 16:27:46 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-09-08 23:14:28 +0300 |
commit | 48fec5d0a504dfbb302cb1dd24ebb0b82a46cce9 (patch) | |
tree | 41b4e0cf38951bf49372e1272a08c8264bf3d943 /fs/ceph/addr.c | |
parent | 64291f7db5bd8150a74ad2036f1037e6a0428df2 (diff) | |
download | blackbird-op-linux-48fec5d0a504dfbb302cb1dd24ebb0b82a46cce9.tar.gz blackbird-op-linux-48fec5d0a504dfbb302cb1dd24ebb0b82a46cce9.zip |
ceph: EIO all operations after forced umount
This patch makes try_get_cap_refs() and __do_request() check
if the file system was forced umount, and return -EIO if it was.
This patch also adds a helper function to drops dirty caps and
wakes up blocking operation.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 890c50971a69..1594f2c590bd 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -717,7 +717,7 @@ static int ceph_writepages_start(struct address_space *mapping, wbc->sync_mode == WB_SYNC_NONE ? "NONE" : (wbc->sync_mode == WB_SYNC_ALL ? "ALL" : "HOLD")); - if (fsc->mount_state == CEPH_MOUNT_SHUTDOWN) { + if (ACCESS_ONCE(fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) { pr_warn("writepage_start %p on forced umount\n", inode); return -EIO; /* we're in a forced umount, don't write! */ } |