]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
server: negative error code when responding to client 9693/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 14 Jun 2016 11:32:01 +0000 (19:32 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 14 Jun 2016 11:32:01 +0000 (19:32 +0800)
As the comment suggests. Also a zero or positive return code
shall indicates a success, which does not match our intention here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mds/Server.cc

index e7ef6251d844b6e69e4a44961a095bb9c9a54ac8..0df703b0adfbe6c8c3535e040737191416b297cb 100644 (file)
@@ -2927,7 +2927,7 @@ void Server::handle_client_open(MDRequestRef& mdr)
   if ((flags & O_TRUNC) && !cur->inode.is_file()) {
     dout(7) << "specified O_TRUNC on !(file|symlink) " << *cur << dendl;
     // we should return -EISDIR for directory, return -EINVAL for other non-regular
-    respond_to_request(mdr, cur->inode.is_dir() ? EISDIR : -EINVAL);
+    respond_to_request(mdr, cur->inode.is_dir() ? -EISDIR : -EINVAL);
     return;
   }