Commit d780846e authored by akam kumar bharathi's avatar akam kumar bharathi Committed by Greg Kroah-Hartman

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: default avatarJohn Hammond <>
Signed-off-by: default avatarakam kumar bharathi <>
Intel-bug-id: default avatarAndreas Dilger <>
Signed-off-by: default avatarOleg Drokin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent aae5d55a
......@@ -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 &
lmdp = (struct lov_user_mds_data __user *)arg;
if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st))) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment