From: Sage Weil Date: Mon, 14 Apr 2008 20:58:38 +0000 (-0700) Subject: mds: truncate can _increase_ file size, too! X-Git-Tag: v0.2~204^2~29^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7462630e1ac40a11b0d9afc85527499197eb52a1;p=ceph.git mds: truncate can _increase_ file size, too! --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 5a576ddaf1811..22ef2a6c51763 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -3888,8 +3888,8 @@ void Server::handle_client_truncate(MDRequest *mdr) if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks)) return; - // already small enough? - if (cur->inode.size <= req->head.args.truncate.length) { + // already the correct size? + if (cur->inode.size == req->head.args.truncate.length) { reply_request(mdr, 0); return; }