Skip to contentSkip to conversation

coredump: use defined macro instead of raw value in filp_open

PATCH New Masatake YAMATO 1 participant 1 message Dec 15, 2014 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coredump: use defined macro instead of raw value in filp_open

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

---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -1
index b5c86ff..7ec0d2b 100644
@@ -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;
Signature · 1 line
1.9.3