summaryrefslogtreecommitdiffstats
path: root/src/mds
diff options
context:
space:
mode:
authorxie xingguo <xie.xingguo@zte.com.cn>2016-06-14 13:32:01 +0200
committerxie xingguo <xie.xingguo@zte.com.cn>2016-06-14 13:32:01 +0200
commit26931f888ce4661765cca106b3a3dc66702266df (patch)
tree4cd72afcdcfc03ad221b3a9815e76b40df0b2981 /src/mds
parentMerge pull request #9484 from jmunhoz/aws4-streaming (diff)
downloadceph-26931f888ce4661765cca106b3a3dc66702266df.tar.xz
ceph-26931f888ce4661765cca106b3a3dc66702266df.zip
server: negative error code when responding to client
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>
Diffstat (limited to 'src/mds')
-rw-r--r--src/mds/Server.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index e7ef6251d84..0df703b0adf 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -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;
}