Whamcloud - gitweb
LU-1951 mdd: fix for error handler of mdd_rename
authorLiang Zhen <liang@whamcloud.com>
Fri, 5 Oct 2012 12:16:19 +0000 (20:16 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 5 Nov 2012 00:30:29 +0000 (19:30 -0500)
commitdb5422f3e1646b5752d0e8a7451c99fbab94d33e
tree8fc07d9279ec6c60ec17cbaf2fa672603bb4dd03
parent867a0e5591ababddff68e451580ab1accee2ea4d
LU-1951 mdd: fix for error handler of mdd_rename

If mdd_rename() failed to unlink target file/dir, it will try to
revert everything including insert target file/dir back into target
directory, but it didn't restore nlink count of target, which will
leave a file/dir under target directory with wrong nlink number.

Another thing is fixed by this patch is, mdd_attr_check_set_internal()
didn't release mdd_write_lock() while jumping to error handler.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I601f0569de87b71d032f86ed1082c27d5bf5adaf
Reviewed-on: http://review.whamcloud.com/4405
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_dir.c