LU-1337 llite: kernel 3.2 protects inode->i_nlink
Kernel 3.2 protects inode->i_nlink from direct modification.
Filesystems can only read i_nlink directly and shall use the
(set|clear|inc|drop)_nlink for modification.
See kernel commit
a78ef704a8dd430225955f0709b22d4a6ba21deb.
This patch adds LC_HAVE_PROTECT_I_NLINK checking and implements
set_nlink for old kernel, clear/inc/drop_nlink exists after 2.6.18
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ie958cb308291ecc48d409a1282fed7ea3549a561
Reviewed-on: http://review.whamcloud.com/3577
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>