Whamcloud - gitweb
LU-2311 osd-ldiskfs: fix link refcounting
authorHongchao Zhang <hongchao.zhang@intel.com>
Mon, 8 Apr 2013 02:59:49 +0000 (10:59 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 29 Apr 2013 22:03:24 +0000 (18:03 -0400)
commitad32c0736a971f74cbf5e750c6cae90320ec2589
tree186be6d744e4d894a5175191b47b668e1ee8dc5f
parentb9751627019c5a11071366748c316f357c4a3c1d
LU-2311 osd-ldiskfs: fix link refcounting

Fix potential problem with osd_object_ref_{add,del}() where the link
count is temporarily set to an invalid value before being corrected
later on.  Since the link count is accessed in some places without a
lock, there is a chance an invalid value is sampled.  This was fixed
in ext4 via kernel commit 909a4cf1ffe4b875c87abf38239a9bfd25167e0c.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Change-Id: I396bff24f8a23d6b7622cebfb39b8f847e500c1e
Reviewed-on: http://review.whamcloud.com/4675
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
lustre/osd-ldiskfs/osd_handler.c