Skip to content

Commit

Permalink
Merge pull request #9562: jewel: client: fstat cap release
Browse files Browse the repository at this point in the history
Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Jun 30, 2016
2 parents 30db19f + c025010 commit d1a1979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/client/Client.cc
Expand Up @@ -8700,16 +8700,16 @@ int Client::_fsync(Fh *f, bool syncdataonly)
return _fsync(f->inode.get(), syncdataonly);
}

int Client::fstat(int fd, struct stat *stbuf)
int Client::fstat(int fd, struct stat *stbuf, int mask)
{
Mutex::Locker lock(client_lock);
tout(cct) << "fstat" << std::endl;
tout(cct) << "fstat mask " << hex << mask << std::endl;
tout(cct) << fd << std::endl;

Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
int r = _getattr(f->inode, -1);
int r = _getattr(f->inode, mask);
if (r < 0)
return r;
fill_stat(f->inode, stbuf, NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/client/Client.h
Expand Up @@ -1016,7 +1016,7 @@ class Client : public Dispatcher, public md_config_obs_t {
int fake_write_size(int fd, loff_t size);
int ftruncate(int fd, loff_t size);
int fsync(int fd, bool syncdataonly);
int fstat(int fd, struct stat *stbuf);
int fstat(int fd, struct stat *stbuf, int mask=CEPH_STAT_CAP_INODE_ALL);
int fallocate(int fd, int mode, loff_t offset, loff_t length);

// full path xattr ops
Expand Down

0 comments on commit d1a1979

Please sign in to comment.