extern "C" int ceph_stat(struct ceph_mount_info *cmount, const char *path,
struct stat *stbuf)
{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
return cmount->get_client()->stat(path, stbuf);
}
}
extern "C" int ceph_fchmod(struct ceph_mount_info *cmount, int fd, mode_t mode)
{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
return cmount->get_client()->fchmod(fd, mode);
}
extern "C" int ceph_chown(struct ceph_mount_info *cmount, const char *path,
extern "C" int ceph_fchown(struct ceph_mount_info *cmount, int fd,
uid_t uid, gid_t gid)
{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
return cmount->get_client()->fchown(fd, uid, gid);
}
extern "C" int ceph_lchown(struct ceph_mount_info *cmount, const char *path,
uid_t uid, gid_t gid)
{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
return cmount->get_client()->lchown(path, uid, gid);
}