From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masatake YAMATO Subject: [PATCH] coredump: use defined macro instead of raw value in filp_open Date: Mon, 15 Dec 2014 22:30:20 +0900 Message-ID: <1418650220-20094-1-git-send-email-yamato@redhat.com> Cc: yamato@redhat.com To: linux-fsdevel@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbaLONa2 (ORCPT ); Mon, 15 Dec 2014 08:30:28 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: `2' was hard-coded where O_RDWR can be used. O_RDWR is better for code reading. Signed-off-by: Masatake YAMATO --- 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