ceph: pass ino# instead of old_dentry if it's disconnected
authorXiubo Li <xiubli@redhat.com>
Wed, 26 Apr 2023 02:38:57 +0000 (10:38 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 30 Apr 2023 10:37:28 +0000 (12:37 +0200)
commita5ffd7b6e91a12975ae30de863437cc04387576a
tree31dfffa7449245e33eaa269a7e53e11a0d2afdae
parentaaf67de78807c59c35bafb5003d4fb457c764800
ceph: pass ino# instead of old_dentry if it's disconnected

When exporting the kceph to NFS it may pass a DCACHE_DISCONNECTED
dentry for the link operation. Then it will parse this dentry as a
snapdir, and the mds will fail the link request as -EROFS.

MDS allow clients to pass a ino# instead of a path.

Link: https://tracker.ceph.com/issues/59515
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c
fs/ceph/mds_client.c