[08/14] lustre: llite: op_data->op_valid is incorrect in ll_dir_getstripe
diff mbox series

Message ID 1546810607-6348-9-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: fixes for many test failures
Related show

Commit Message

James Simmons Jan. 6, 2019, 9:36 p.m. UTC
The function ll_dir_getstripe() passes in valid but it was never
used to properly setup op_data->op_valid which prevented user
land applications from getting real directory striping
information. Apply the passed in valid parameter to the
op_data->op_valid field.

Fixes: 6e23ea986bf ("staging: lustre: llite: fix "getdirstripe" to show stripe info")
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 86b5c7a..0a7330d 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -631,7 +631,7 @@  int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size,
 	if (IS_ERR(op_data))
 		return PTR_ERR(op_data);
 
-	op_data->op_valid = OBD_MD_FLEASIZE | OBD_MD_FLDIREA;
+	op_data->op_valid = valid | OBD_MD_FLEASIZE | OBD_MD_FLDIREA;
 	rc = md_getattr(sbi->ll_md_exp, op_data, &req);
 	ll_finish_md_op_data(op_data);
 	if (rc < 0) {