]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: set snapdir's link count to 1
authorYan, Zheng <zyan@redhat.com>
Fri, 14 Jun 2019 04:01:31 +0000 (12:01 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 14 Jun 2019 04:01:31 +0000 (12:01 +0800)
Otherwise nfs-ganesha treats snapdir as stale.

Fixes: https://tracker.ceph.com/issues/40101
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/Client.cc

index 01fd1683dafac386cae46fabaa4dce77671fe164..315c1cce85e5b09e6323a2cb1c54039edc9b8010 100644 (file)
@@ -10586,6 +10586,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;