From: Chen LinX <linx.z.chen@intel.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: yanmin_zhang@linux.intel.com, "Chen,
LinX" <linx.z.chen@intel.com>, "He, Bo" <bo.he@intel.com>
Subject: [PATCH] debugfs: keep the old valid mode value when no explicity specify it
Date: Thu, 28 Aug 2014 18:09:09 +0800 [thread overview]
Message-ID: <1409220549-15485-1-git-send-email-linx.z.chen@intel.com> (raw)
From: "Chen, LinX" <linx.z.chen@intel.com>
When mount debugfs with no mode specifed after it's mounted, the mount
point mode will change to default mode(0700) even the mount operation was fail,
this will cause some issues like can't get binder info in android. Here we can
keep the old valid mode if no explicity specify the mode value and also change
the mode value even the mount fails if the mode value is specified.
Change-Id: I591ce5328e9589adfc3d7317f04276bf0033202a
Signed-off-by: He, Bo <bo.he@intel.com>
Signed-off-by: Chen, LinX <linx.z.chen@intel.com>
---
fs/debugfs/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c7c83ff..f1eb4b9 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -159,7 +159,8 @@ static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts)
kgid_t gid;
char *p;
- opts->mode = DEBUGFS_DEFAULT_MODE;
+ if (opts->mode == 0)
+ opts->mode = DEBUGFS_DEFAULT_MODE;
while ((p = strsep(&data, ",")) != NULL) {
if (!*p)
--
1.7.9.5
next reply other threads:[~2014-08-28 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 10:09 Chen LinX [this message]
2014-08-28 15:10 ` Greg KH
2014-08-29 1:30 ` Zhang, Yanmin
2014-08-29 18:24 ` Greg KH
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=1409220549-15485-1-git-send-email-linx.z.chen@intel.com \
--to=linx.z.chen@intel.com \
--cc=bo.he@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yanmin_zhang@linux.intel.com \
/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
Powered by JetHome