From: akam kumar bharathi Date: Tue, 15 Dec 2015 17:53:04 +0000 (+0530) Subject: LU-5954 IOC_MDC_GETFILEINFO returns the wrong ino X-Git-Tag: 2.8.55~49 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=86158ae647b25338489bcb3181f29081f1d0368f 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 --- 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)))