From 86158ae647b25338489bcb3181f29081f1d0368f Mon Sep 17 00:00:00 2001 From: akam kumar bharathi Date: Tue, 15 Dec 2015 23:23:04 +0530 Subject: [PATCH] LU-5954 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(). Change-Id: I8429d726ff5f6c2c2d342e2c59f163608c794307 Signed-off-by: John Hammond Signed-off-by: akam kumar bharathi Reviewed-on: http://review.whamcloud.com/17618 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index ec71a19..ea21381 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -1445,7 +1445,9 @@ out_rmdir: st.st_atime = body->mbo_atime; st.st_mtime = body->mbo_mtime; st.st_ctime = body->mbo_ctime; - st.st_ino = inode->i_ino; + st.st_ino = cl_fid_build_ino(&body->mbo_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))) -- 1.8.3.1