Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1427053

[PATCH v2 24/29] staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino

From Oleg Drokin <green@linuxhacker.ru>
Newsgroups linux.kernel
Subject [PATCH v2 24/29] staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino
Date 2016-06-20 23:20 +0200
Message-ID <rMeLT-52j-1@gated-at.bofh.it> (permalink)
References <rMesx-4Gc-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: akam kumar bharathi <azurelustre@gmail.com>

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>
---
 drivers/staging/lustre/lustre/llite/dir.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index f0eb64b..7e7425d 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1528,7 +1528,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))) {
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/29] Lustre fixes Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:10 +0200
  [PATCH v2 23/29] staging/lustre/llite: ll_revalidate_dentry update Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:10 +0200
  [PATCH v2 24/29] staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 05/29] staging/lustre/osc: osc_lock_weight endless loop fix Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 18/29] staging/lustre/ldlm: const qualify struct lustre_handle * params Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 17/29] staging/lustre/llite: change it_data to it_request Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 27/29] staging/lustre/osc: glimpse lock should match only with granted locks Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 08/29] staging/lustre/ptlrpc: missing wakeup for ptlrpc_check_set Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 22/29] staging/lustre/llite: Restore proper opencache operations Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 04/29] staging/lustre/llite: lock i_lock before __d_drop() Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 01/29] staging/lustre/llite: allocate and free client cache asynchronously Oleg Drokin <green@linuxhacker.ru> - 2016-06-20 23:20 +0200
  [PATCH v2 28/29] staging/lustre/libcfs: Do not call kthread_run in wrong state Oleg Drokin <green@linuxhacker.ru> - 2016-06-21 00:10 +0200
  [PATCH v2 06/29] staging/lustre/osc: Fix reverted condition in osc_lock_weight Oleg Drokin <green@linuxhacker.ru> - 2016-06-21 00:10 +0200
  [PATCH v2 07/29] staging/lustre/ptlrpc: reorganize ptlrpc_request Oleg Drokin <green@linuxhacker.ru> - 2016-06-21 00:10 +0200

csiph-web