Whamcloud - gitweb
LU-7315 osd-ldiskfs: handle pdo lock properly 24/16924/6
authorFan Yong <fan.yong@intel.com>
Sat, 3 Oct 2015 01:45:32 +0000 (09:45 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 4 Dec 2015 17:58:03 +0000 (17:58 +0000)
commit343364d0f06c34f403eb009de498455b5ebe14be
treea99495474e5c0e6f35fa79d20aba2ba7dc8b6c47
parent2f6a3f64713d8a09fe94235a12e87225048e11ac
LU-7315 osd-ldiskfs: handle pdo lock properly

Inside the osd_dirent_check_repair(), if the logic comes to
"goto again", it only unlock the "hlock" but without seting
the variable @hlock as NULL. Althouth it will not cause any
logic failure, it may make the readers to be confused. This
patch will set "hlock = NULL;" explicitly to avoid trouble.

On the other hand, inside ldiskfs, the pdo lock users need
to check whether the lock handler is NULL or not properly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9db9dc758a2976849c299f76e06723e796da235d
Reviewed-on: http://review.whamcloud.com/16924
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
ldiskfs/kernel_patches/patches/rhel6.3/ext4-pdirop.patch
ldiskfs/kernel_patches/patches/rhel7/ext4-pdirop.patch
ldiskfs/kernel_patches/patches/sles12/ext4-pdirop.patch
lustre/osd-ldiskfs/osd_handler.c