Skip to contentSkip to conversation

f2fs_io: open file in read only mode for pinning file

PATCH New Daeho Jeong 1 participant 1 message Jul 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs_io: open file in read only mode for pinning file

From: Daeho Jeong <[email protected]>

To use "pinfile" command even with read only file, changed open mode for it.

---
 tools/f2fs_io/f2fs_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/f2fs_io/f2fs_io.c +1 -1
index 6266454..abb655a 100644
@@ -349,7 +349,7 @@ static void do_pinfile(int argc, char **argv, const struct cmd_desc *cmd)
 		exit(1);
 	}
 
-	fd = xopen(argv[2], O_RDWR, 0);
+	fd = xopen(argv[2], O_RDONLY, 0);
 
 	ret = -1;
 	if (!strcmp(argv[1], "set")) {
Signature · 8 lines
2.28.0.rc0.142.g3c755180ce-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel