summaryrefslogtreecommitdiff
path: root/crypto/cast6_generic.c
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2022-08-30 17:49:36 +0300
committerIlya Dryomov <idryomov@gmail.com>2022-10-04 20:18:08 +0300
commitbd04b9192e1ff6859d6b3906e91cfd5c9b0ad55b (patch)
treea5135004ff90211720296441ef8fbce179c0d7b1 /crypto/cast6_generic.c
parentb4b924c7a16e857b0715603456045251a49f2ea6 (diff)
downloadlinux-bd04b9192e1ff6859d6b3906e91cfd5c9b0ad55b.tar.xz
ceph: fail the open_by_handle_at() if the dentry is being unlinked
When unlinking a file the kclient will send a unlink request to MDS by holding the dentry reference, and then the MDS will return 2 replies, which are unsafe reply and a deferred safe reply. After the unsafe reply received the kernel will return and succeed the unlink request to user space apps. Only when the safe reply received the dentry's reference will be released. Or the dentry will only be unhashed from dcache. But when the open_by_handle_at() begins to open the unlinked files it will succeed. The inode->i_count couldn't be used to check whether the inode is opened or not. Link: https://tracker.ceph.com/issues/56524 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Luís Henriques <lhenriques@suse.de> Tested-by: Luís Henriques <lhenriques@suse.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'crypto/cast6_generic.c')
0 files changed, 0 insertions, 0 deletions