]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: set snapdir's link count to 1 29343/head
authorYan, Zheng <zyan@redhat.com>
Fri, 14 Jun 2019 04:01:31 +0000 (12:01 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 26 Jul 2019 01:58:31 +0000 (21:58 -0400)
Otherwise nfs-ganesha treats snapdir as stale.

Fixes: https://tracker.ceph.com/issues/40101
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7ad002307d7d34578478b1fee02be071d6b65250)

src/client/Client.cc

index 0e79823c5980a988d3fef4bd259cd92ae6e887fd..7cd2c3d7db215b067fa4c3ff6d5d23966793905c 100644 (file)
@@ -10582,6 +10582,7 @@ Inode *Client::open_snapdir(Inode *diri)
     in->mode = diri->mode;
     in->uid = diri->uid;
     in->gid = diri->gid;
+    in->nlink = 1;
     in->mtime = diri->mtime;
     in->ctime = diri->ctime;
     in->btime = diri->btime;