mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-04 02:15:58 -04:00
main: report the st_ino known so far
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
5b156f97a8
commit
0d8c5480d1
11
main.c
11
main.c
@ -944,7 +944,8 @@ rpl_stat (fuse_req_t req, struct ovl_node *node, int fd, const char *path, struc
|
||||
|
||||
st->st_ino = node->tmp_ino;
|
||||
st->st_dev = node->tmp_dev;
|
||||
if (ret == 0 && node_dirp (node))
|
||||
|
||||
if (node_dirp (node))
|
||||
{
|
||||
if (!data->static_nlink)
|
||||
{
|
||||
@ -961,6 +962,14 @@ rpl_stat (fuse_req_t req, struct ovl_node *node, int fd, const char *path, struc
|
||||
else
|
||||
st->st_nlink = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct ovl_node *n;
|
||||
|
||||
st->st_nlink = 0;
|
||||
for (n = node->ino->node; n; n = n->next_link)
|
||||
st->st_nlink++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user