diff options
| author | Steve French <sfrench@us.ibm.com> | 2011-01-31 04:17:03 +0000 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2011-01-31 04:17:03 +0000 |
| commit | 58b8a5b45a097b477c037bc376e65dc5f214bf3d (patch) | |
| tree | 9fa2538a113fbd3aaa322d9c972aca3ca16b7e30 /fs/ceph/xattr.c | |
| parent | ffeb414a59291d5891f09727beb793c109f19f08 (diff) | |
| parent | 70d1f365568e0cdbc9f4ab92428e1830fdb09ab0 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/ceph/xattr.c')
| -rw-r--r-- | fs/ceph/xattr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 6e12a6ba5f79..8c9eba6ef9df 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -219,6 +219,7 @@ static struct ceph_inode_xattr *__get_xattr(struct ceph_inode_info *ci, struct rb_node **p; struct rb_node *parent = NULL; struct ceph_inode_xattr *xattr = NULL; + int name_len = strlen(name); int c; p = &ci->i_xattrs.index.rb_node; @@ -226,6 +227,8 @@ static struct ceph_inode_xattr *__get_xattr(struct ceph_inode_info *ci, parent = *p; xattr = rb_entry(parent, struct ceph_inode_xattr, node); c = strncmp(name, xattr->name, xattr->name_len); + if (c == 0 && name_len > xattr->name_len) + c = 1; if (c < 0) p = &(*p)->rb_left; else if (c > 0) |
