Whamcloud - gitweb
LU-7343 osd-ldiskfs: handle ldiskfs_append failure 48/17148/5
authorFan Yong <fan.yong@intel.com>
Fri, 2 Oct 2015 05:21:21 +0000 (13:21 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 30 Nov 2015 17:18:30 +0000 (17:18 +0000)
commit113aac9c212d63ec880a9731bd9a364f9b9a99bf
tree67e1d942da750537e4f08fd570f35e32d5878417
parent85249944686732af327a5bfaa25ff2a4098421e8
LU-7343 osd-ldiskfs: handle ldiskfs_append failure

In new linux kernel (linux-3.1x, x>=0), the ldiskfs exported
function ldiskfs_append() return error# via the return value,
instead of via the output parameter @err as it does on other
kernels (linux-2.6). Under such case, the caller should not
assume non-NULL returned value is valid buffer head, it can
stands for error#. So check that properly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I4dca43bcfd31aafd999f54934a51d258071dab22
Reviewed-on: http://review.whamcloud.com/17148
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/osd-ldiskfs/osd_iam.c
lustre/osd-ldiskfs/osd_iam_lfix.c
lustre/osd-ldiskfs/osd_iam_lvar.c
lustre/osd-ldiskfs/osd_internal.h