summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorakam kumar bharathi <azurelustre@gmail.com>2016-06-20 16:55:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 14:28:39 -0700
commitd780846e0f3616214c0272ed2445445f69311a2c (patch)
tree3fb89b996de9da0ba7dc6d25db6dcb9a25f323b2 /drivers/staging
parentaae5d55a24f74d429f32895cf73b9839d0d5e6e1 (diff)
downloadlinux-stable-d780846e0f3616214c0272ed2445445f69311a2c.tar.gz
linux-stable-d780846e0f3616214c0272ed2445445f69311a2c.tar.bz2
linux-stable-d780846e0f3616214c0272ed2445445f69311a2c.zip
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/llite/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 92b01fdc828d..5b381779c827 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1523,7 +1523,9 @@ skip_lmm:
st.st_atime = body->atime;
st.st_mtime = body->mtime;
st.st_ctime = body->ctime;
- st.st_ino = inode->i_ino;
+ st.st_ino = cl_fid_build_ino(&body->fid1,
+ sbi->ll_flags &
+ LL_SBI_32BIT_API);
lmdp = (struct lov_user_mds_data __user *)arg;
if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st))) {