Commit 49bcb932 authored by Henry C Chang's avatar Henry C Chang Committed by Sage Weil

ceph: add request to the tail of unsafe write list

In sync_write_wait(), we assume that the newest request is at the
tail of unsafe write list. We should maintain the semantics here.
Signed-off-by: default avatarHenry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 78a25565
......@@ -564,7 +564,8 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
* start_request so that a tid has been assigned.
*/
spin_lock(&ci->i_unsafe_lock);
list_add(&req->r_unsafe_item, &ci->i_unsafe_writes);
list_add_tail(&req->r_unsafe_item,
&ci->i_unsafe_writes);
spin_unlock(&ci->i_unsafe_lock);
ceph_get_cap_refs(ci, CEPH_CAP_FILE_WR);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment