diff options
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 1bcf712655d9..9165eb8309eb 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1590,7 +1590,7 @@ static int set_request_path_attr(struct inode *rinode, struct dentry *rdentry, | |||
1590 | } else if (rpath || rino) { | 1590 | } else if (rpath || rino) { |
1591 | *ino = rino; | 1591 | *ino = rino; |
1592 | *ppath = rpath; | 1592 | *ppath = rpath; |
1593 | *pathlen = strlen(rpath); | 1593 | *pathlen = rpath ? strlen(rpath) : 0; |
1594 | dout(" path %.*s\n", *pathlen, rpath); | 1594 | dout(" path %.*s\n", *pathlen, rpath); |
1595 | } | 1595 | } |
1596 | 1596 | ||
@@ -1876,9 +1876,14 @@ finish: | |||
1876 | static void __wake_requests(struct ceph_mds_client *mdsc, | 1876 | static void __wake_requests(struct ceph_mds_client *mdsc, |
1877 | struct list_head *head) | 1877 | struct list_head *head) |
1878 | { | 1878 | { |
1879 | struct ceph_mds_request *req, *nreq; | 1879 | struct ceph_mds_request *req; |
1880 | LIST_HEAD(tmp_list); | ||
1881 | |||
1882 | list_splice_init(head, &tmp_list); | ||
1880 | 1883 | ||
1881 | list_for_each_entry_safe(req, nreq, head, r_wait) { | 1884 | while (!list_empty(&tmp_list)) { |
1885 | req = list_entry(tmp_list.next, | ||
1886 | struct ceph_mds_request, r_wait); | ||
1882 | list_del_init(&req->r_wait); | 1887 | list_del_init(&req->r_wait); |
1883 | __do_request(mdsc, req); | 1888 | __do_request(mdsc, req); |
1884 | } | 1889 | } |