]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: set snapdir's link count to 1 30108/head
authorYan, Zheng <zyan@redhat.com>
Fri, 14 Jun 2019 04:01:31 +0000 (12:01 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Sep 2019 14:45:11 +0000 (16:45 +0200)
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 2b8673ff002cc4abd776f038d429c53bdfa9a5f4..63c243521dd491e9cba71bab65cfc93711e6a2c4 100644 (file)
@@ -10328,6 +10328,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;