]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug
authorSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:30:55 +0000 (11:30 -0700)
committerSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:30:55 +0000 (11:30 -0700)
commitc6689d3dab7014a889cb2e01ab5b8caed223983f
treef15c11fc2c9b08e64555bbb601e582dc8f7325bd
parente2abf2a2baf8cec9de7dab14f54dea8dcd2cf9c6
ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug

Have caller pass in a safely-obtained reference to the parent directory
for calculating a dentry's hash valud.

While we're here, simpify the flow through ceph_encode_fh() so that there
is a single exit point and cleanup.

Also fix a bug with the dentry hash calculation: calculate the hash for the
dentry we were given, not its parent.

Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/dir.c
fs/ceph/export.c
fs/ceph/mds_client.c
fs/ceph/super.h