Преглед изворни кода

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 <henry_c_chang@tcloudcomputing.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Henry C Chang пре 14 година
родитељ
комит
49bcb93236
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      fs/ceph/file.c

+ 2 - 1
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);
 		}