ceph: fix xattr rbtree search
authorSage Weil <sage@newdream.net>
Thu, 13 Jan 2011 23:27:29 +0000 (15:27 -0800)
committerSage Weil <sage@newdream.net>
Thu, 13 Jan 2011 23:50:11 +0000 (15:50 -0800)
Fix xattr name comparison in rbtree search for strings that share a prefix.
The *name argument is null terminated, but the xattr name is not, so we
need to use strncmp, but that means adjusting for the case where name is
a prefix of xattr->name.

The corresponding case in __set_xattr() already handles this properly
(although in that case *name is also not null terminated).

Reported-by: Sergiy Kibrik <sakib@meta.ua>
Signed-off-by: Sage Weil <sage@newdream.net>

No differences found