From: Henry C Chang Date: Tue, 15 Mar 2011 09:18:02 +0000 (+0000) Subject: ceph: add request to the tail of unsafe write list X-Git-Tag: firefly_0821_release~7613^2~1616^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=49bcb93236ce1c60d9b7eb21a0aea1999f4d8709;p=firefly-linux-kernel-4.4.55.git 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: Henry C Chang Signed-off-by: Sage Weil --- diff --git a/fs/ceph/file.c b/fs/ceph/file.c index db5d86309744..159b512d5a27 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -564,7 +564,8 @@ more: * 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); }