From: xie xingguo Date: Mon, 20 Jun 2016 07:15:28 +0000 (+0800) Subject: fuse_ll: fix incorrect error settings of fuse_ll_mkdir() X-Git-Tag: ses5-milestone5~580^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e6e60a0c278f5c133ef087690673c57264ba6f9;p=ceph.git fuse_ll: fix incorrect error settings of fuse_ll_mkdir() As fuse_reply_err() actually requires a positive error number. Signed-off-by: xie xingguo --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 065a6e96845..9e4babed1f7 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -340,11 +340,11 @@ static void fuse_ll_mkdir(fuse_req_t req, fuse_ino_t parent, const char *name, int err = 0; int fd = ::open(cfuse->mountpoint, O_RDONLY | O_DIRECTORY); if (fd < 0) { - err = -errno; + err = errno; } else { int r = ::syncfs(fd); if (r < 0) - err = -errno; + err = errno; ::close(fd); } if (err) {