Message ID | 20230207031301.363786-1-xiubli@redhat.com |
---|---|
State | New |
Headers | show |
Series | ceph: fail the requests directly if inode is shutdown for fscrypt | expand |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 6cde84c9000f..903de296f0d3 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -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; /*