Whamcloud - gitweb
LU-3643 ofd: get data version only if file exists
authorJinshan Xiong <jinshan.xiong@intel.com>
Fri, 26 Jul 2013 00:48:22 +0000 (17:48 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 8 Aug 2013 06:08:06 +0000 (02:08 -0400)
commit24429b8219351b2ea32435a8b683161db53fd123
treeb70f4455437601eac752fe4fa36d4afda8cba1f0
parent164400dd037cfcaba884a9b5321a5fec3826d116
LU-3643 ofd: get data version only if file exists

In ofd_getattr(), dt_version_get() could be called on a non-existant
object, leading to a NULL pointer for its inode.
It should try to call dt_version_get() only if attr_get returns
success; otherwise it will crash.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I450fb78b85ea86d813ccad4de2f14f5bd4fca645
Reviewed-on: http://review.whamcloud.com/7124
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ofd/ofd_obd.c