linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masatake YAMATO <yamato@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: yamato@redhat.com
Subject: [PATCH] coredump: use defined macro instead of raw value in filp_open
Date: Mon, 15 Dec 2014 22:30:20 +0900	[thread overview]
Message-ID: <1418650220-20094-1-git-send-email-yamato@redhat.com> (raw)

`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


                 reply	other threads:[~2014-12-15 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418650220-20094-1-git-send-email-yamato@redhat.com \
    --to=yamato@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).