Browse Source

Merge pull request #878 from trapexit/readdir_rewind_fix

reset dentry buffer when rewind'ed
pull/880/head
trapexit 4 years ago
committed by GitHub
parent
commit
39d98f1eac
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/fuse_readdir_linux.cpp
  2. 2
      src/fuse_readdir_plus_linux.cpp
  3. 2
      src/fuse_readdir_plus_posix.cpp
  4. 2
      src/fuse_readdir_posix.cpp

2
src/fuse_readdir_linux.cpp

@ -65,6 +65,8 @@ namespace l
uint64_t namelen;
struct linux_dirent64 *d;
fuse_dirents_reset(buf_);
buf = (char*)g_DENTS_BUF_POOL.alloc();
if(buf == NULL)
return -ENOMEM;

2
src/fuse_readdir_plus_linux.cpp

@ -70,6 +70,8 @@ namespace l
fuse_entry_t entry;
struct linux_dirent64 *d;
fuse_dirents_reset(buf_);
buf = (char*)g_DENTS_BUF_POOL.alloc();
entry.nodeid = 0;

2
src/fuse_readdir_plus_posix.cpp

@ -71,6 +71,8 @@ namespace l
uint64_t namelen;
fuse_entry_t entry;
fuse_dirents_reset(buf_);
entry.nodeid = 0;
entry.generation = 0;
entry.entry_valid = entry_timeout_;

2
src/fuse_readdir_posix.cpp

@ -67,6 +67,8 @@ namespace l
string fullpath;
uint64_t namelen;
fuse_dirents_reset(buf_);
for(const auto &branch : *branches_)
{
int rv;

Loading…
Cancel
Save