staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino
authorakam kumar bharathi <azurelustre@gmail.com>
Mon, 20 Jun 2016 20:55:47 +0000 (16:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2016 21:28:39 +0000 (14:28 -0700)
commitd780846e0f3616214c0272ed2445445f69311a2c
tree3fb89b996de9da0ba7dc6d25db6dcb9a25f323b2
parentaae5d55a24f74d429f32895cf73b9839d0d5e6e1
staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino

req_capsule_server_get() through  __req_capsule_get in ll_dir_ioctl()
returns a pointer to a PTLRPC request or reply buffer, which is assigned
to struct mdt_body.

If the command is IOC_MDS_GETFILEINFO then the inode "st.st_ino" should
be assigned from one extracted from mdt_body through cl_fid_build_ino().

Signed-off-by: John Hammond <john.hammond@intel.com>
Signed-off-by: akam kumar bharathi <azurelustre@gmail.com>
Reviewed-on: http://review.whamcloud.com/17618
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5954
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c