All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coredump: use defined macro instead of raw value in filp_open
@ 2014-12-15 13:30 Masatake YAMATO
  0 siblings, 0 replies; only message in thread
From: Masatake YAMATO @ 2014-12-15 13:30 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: yamato

`2' was hard-coded where O_RDWR can be used.
O_RDWR is better for code reading.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/coredump.c b/fs/coredump.c
index b5c86ff..7ec0d2b 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -635,7 +635,7 @@ void do_coredump(const siginfo_t *siginfo)
 		}
 
 		cprm.file = filp_open(cn.corename,
-				 O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE | flag,
+				 O_CREAT | O_RDWR | O_NOFOLLOW | O_LARGEFILE | flag,
 				 0600);
 		if (IS_ERR(cprm.file))
 			goto fail_unlock;
-- 
1.9.3


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

only message in thread, other threads:[~2014-12-15 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 13:30 [PATCH] coredump: use defined macro instead of raw value in filp_open Masatake YAMATO

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.