When truncating a file, we should xlock the corresponding filelock.
(revoke any Fw caps from clients).
[note from sw: setattr on size also takes the filelock xlock.]
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mdr->session->have_completed_request(req->get_reqid().tid, NULL))) {
assert(cur->is_auth());
- wrlocks.insert(&cur->filelock);
+ xlocks.insert(&cur->filelock);
if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
return;