ceph: fail the requests directly if inode is shutdown for fscrypt
PATCH 1/1 ceph: fail the requests directly if inode is shutdown for fscrypt
From: Xiubo Li <[email protected]>
This should be folded into the previous commit(2f00ba2d4f33 ceph:
add __ceph_sync_read helper support) based on the 'testing' branch.
The __ceph_sync_read() will be called by setattr by fscrypt relevant code.
Signed-off-by Xiubo Li <[email protected]>
--- fs/ceph/file.c | 3 +++ 1 file changed, 3 insertions(+)
fs/ceph/file.c +3 -0
@@ -976,6 +976,9 @@ ssize_t __ceph_sync_read(struct inode *inode, loff_t *ki_pos,dout ("sync_read on inode %p %llx~%llx\n" , inode, *ki_pos, len); +if (ceph_inode_is_shutdown (inode)) +return -EIO ; +if (!len)return 0 ;/*
Signature · 1 line
2.31.1