linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs_io: open file in read only mode for pinning file
@ 2020-07-30  6:29 Daeho Jeong
  0 siblings, 0 replies; only message in thread
From: Daeho Jeong @ 2020-07-30  6:29 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Daeho Jeong

From: Daeho Jeong <daehojeong@google.com>

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

Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
 tools/f2fs_io/f2fs_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 6266454..abb655a 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -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")) {
-- 
2.28.0.rc0.142.g3c755180ce-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-30  6:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  6:29 [f2fs-dev] [PATCH] f2fs_io: open file in read only mode for pinning file Daeho Jeong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).