From: Yehuda Sadeh Date: Tue, 13 Apr 2010 18:45:56 +0000 (-0700) Subject: ceph: reserve one more caps space when doing readdir X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1e4dd0caa63e166afa46a1ccc947bebb4f66bcf;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git ceph: reserve one more caps space when doing readdir We were missing space for the directory cap. The result was a BUG at fs/ceph/caps.c:2178. Signed-off-by: Yehuda Sadeh Signed-off-by: Sage Weil --- diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 7505b4f1f597..159f588ca160 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -311,7 +311,7 @@ more: req->r_readdir_offset = fi->next_offset; req->r_args.readdir.frag = cpu_to_le32(frag); req->r_args.readdir.max_entries = cpu_to_le32(max_entries); - req->r_num_caps = max_entries; + req->r_num_caps = max_entries + 1; err = ceph_mdsc_do_request(mdsc, NULL, req); if (err < 0) { ceph_mdsc_put_request(req);