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>
LU-1840 ldlm: fix mutex leak in ldlm_resource_get

We created resource with lr_lvb_mutex locked. Need to drop
it before returning.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id81f792605d864b9d3236498f063d6c003d8cd77
Reviewed-on: http://review.whamcloud.com/3883
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1714 lnet: Properly initialize sg_magic value

When the CONFIG_DEBUG_SG flag is enabled in the kernel, we must ensure
the sg_magic field is properly initialized. Otherwise, internal kernel
assertions will fail when trying to verify this field. As a result,
certain calls to sg_* function had to be changed or inserted to ensure
the sg_init_table function would be called, initializing the magic
value. Also, we need to ensure this value isn't zeroed out in the
kiblnd_setup_rd_kiov function.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I5b6b265a4a8dd37408bb78decd79ed54e0f9251b
Reviewed-on: http://review.whamcloud.com/3709
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1729: lu_buf code cleaning

Fix DLUBUF define and use LU_BUF_NULL to clear a lu_buf

Change-Id: I742308616d9c39196e56bf4983523152d26e1245
Signed-off-by: jcl <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/3589
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1199 build: Remove duplicate LC_MODULE_LOADING

It appears that LC_MODULE_LOADING was accidentally declared twice
back-to-back in the same file.  This removes the first declaration
on the assumption that if my eye-balling of the code missed a
difference, the second one is the one we've been using anyway.

Change-Id: I04a9da80d6be7bef6e4fd35eca8f3e490a8a824f
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4407
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1199 build: Remove ancient "nonfree" module support

Lustre doesn't have any "nonfree" kernel modules, and the code to
support "nonfree" was from 2005.  I think we can remove it now.

Change-Id: I790d170fabdc5cd6e4948f20ccca2a6bfdd1bc29
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4408
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>