From: Eric Biggers <ebiggers3@gmail.com>
To: linux-mtd@lists.infradead.org, Richard Weinberger <richard@nod.at>
Cc: linux-fscrypt@vger.kernel.org,
Artem Bityutskiy <dedekind1@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Eric Biggers <ebiggers@google.com>
Subject: [PATCH v2 2/5] ubifs: switch to fscrypt_prepare_link()
Date: Wed, 29 Nov 2017 12:43:14 -0800 [thread overview]
Message-ID: <20171129204317.91205-3-ebiggers3@gmail.com> (raw)
In-Reply-To: <20171129204317.91205-1-ebiggers3@gmail.com>
From: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/ubifs/dir.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 417fe0b29f23..09e6c56b11bc 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -743,9 +743,9 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir,
ubifs_assert(inode_is_locked(dir));
ubifs_assert(inode_is_locked(inode));
- if (ubifs_crypt_is_encrypted(dir) &&
- !fscrypt_has_permitted_context(dir, inode))
- return -EPERM;
+ err = fscrypt_prepare_link(old_dentry, dir, dentry);
+ if (err)
+ return err;
err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
if (err)
--
2.15.0.531.g2ccb3012c9-goog
next prev parent reply other threads:[~2017-11-29 20:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 20:43 [PATCH v2 0/5] ubifs: switch to new fscrypt helper functions Eric Biggers
2017-11-29 20:43 ` [PATCH v2 1/5] ubifs: switch to fscrypt_file_open() Eric Biggers
2017-11-29 20:43 ` Eric Biggers [this message]
2017-11-29 20:43 ` [PATCH v2 3/5] ubifs: switch to fscrypt_prepare_rename() Eric Biggers
2017-11-29 20:43 ` [PATCH v2 4/5] ubifs: switch to fscrypt_prepare_lookup() Eric Biggers
2017-11-29 20:43 ` [PATCH v2 5/5] ubifs: switch to fscrypt_prepare_setattr() Eric Biggers
2018-01-05 18:37 ` [PATCH v2 0/5] ubifs: switch to new fscrypt helper functions Eric Biggers
2018-01-05 22:11 ` Richard Weinberger
2018-01-17 21:12 ` Richard Weinberger
2018-01-17 21:23 ` Eric Biggers
2018-01-17 21:36 ` Richard Weinberger
2018-01-17 23:44 ` Eric Biggers
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=20171129204317.91205-3-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=ebiggers@google.com \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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).