]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: set symlink dest to proper value
authorChristopher Hoffman <choffman@redhat.com>
Wed, 8 Jan 2025 17:53:25 +0000 (17:53 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:34 +0000 (13:59 +0000)
Fixes: https://tracker.ceph.com/issues/69442
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc

index d11f94a7b946a0e7ce619c38fccbbcf65493dd7c..4717b42f4ab3aefa7a88f8b00b05acb693818e42 100644 (file)
@@ -7690,6 +7690,8 @@ int Client::_do_lookup(const InodeRef& dir, const string& name, int mask,
         ldout(cct, 0) << __FILE__ << ":" << __LINE__ << ": failed to decrypt symlink (r=" << ret << ")" << dendl;
       }
       inode->symlink_plain = slname;
+    } else {
+      inode->symlink_plain = inode->symlink;
     }
   }
 
@@ -8292,7 +8294,7 @@ int Client::_readlink(const InodeRef& diri, const char* relpath, char *buf, size
     memcpy(buf, dname.c_str(), dname.size());
     r = dname.size();
   } else {
-    memcpy(buf, in->symlink_plain.c_str(), r);
+    memcpy(buf, in->symlink.c_str(), r);
   }
 
   return r;