fuse: move attr_version to a more relevant place
diff mbox series

Message ID 1556521352-46524-1-git-send-email-zhangliguang@linux.alibaba.com
State New
Headers show
Series
  • fuse: move attr_version to a more relevant place
Related show

Commit Message

luanshi April 29, 2019, 7:02 a.m. UTC
Move attr_version assignment code to the more relevant place.

Signed-off-by: zhangliguang <zhangliguang@linux.alibaba.com>
---
 fs/fuse/readdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c
index 574d03f..8b74fe0 100644
--- a/fs/fuse/readdir.c
+++ b/fs/fuse/readdir.c
@@ -320,7 +320,6 @@  static int fuse_readdir_uncached(struct file *file, struct dir_context *ctx)
 	req->pages[0] = page;
 	req->page_descs[0].length = PAGE_SIZE;
 	if (plus) {
-		attr_version = fuse_get_attr_version(fc);
 		fuse_read_fill(req, file, ctx->pos, PAGE_SIZE,
 			       FUSE_READDIRPLUS);
 	} else {
@@ -340,6 +339,7 @@  static int fuse_readdir_uncached(struct file *file, struct dir_context *ctx)
 			if (ff->open_flags & FOPEN_CACHE_DIR)
 				fuse_readdir_cache_end(file, ctx->pos);
 		} else if (plus) {
+			attr_version = fuse_get_attr_version(fc);
 			err = parse_dirplusfile(page_address(page), nbytes,
 						file, ctx, attr_version);
 		} else {