summaryrefslogtreecommitdiffstats
path: root/fs/crypto/fname.c
diff options
context:
space:
mode:
authorEric Biggers2017-10-09 21:15:36 +0200
committerTheodore Ts'o2017-10-19 01:52:36 +0200
commite0428a266d5a29a3c2eec287fcd49be9e8e2468e (patch)
tree0ecedc8aa9793db447da6abdb31506229f582a50 /fs/crypto/fname.c
parentfs, fscrypt: add an S_ENCRYPTED inode flag (diff)
downloadkernel-qcow2-linux-e0428a266d5a29a3c2eec287fcd49be9e8e2468e.tar.gz
kernel-qcow2-linux-e0428a266d5a29a3c2eec287fcd49be9e8e2468e.tar.xz
kernel-qcow2-linux-e0428a266d5a29a3c2eec287fcd49be9e8e2468e.zip
fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()
IS_ENCRYPTED() now gives the same information as i_sb->s_cop->is_encrypted() but is more efficient, since IS_ENCRYPTED() is just a simple flag check. Prepare to remove ->is_encrypted() by switching all callers to IS_ENCRYPTED(). Acked-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto/fname.c')
-rw-r--r--fs/crypto/fname.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c
index ad9f814fdead..2878289b3ed2 100644
--- a/fs/crypto/fname.c
+++ b/fs/crypto/fname.c
@@ -382,8 +382,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,
memset(fname, 0, sizeof(struct fscrypt_name));
fname->usr_fname = iname;
- if (!dir->i_sb->s_cop->is_encrypted(dir) ||
- fscrypt_is_dot_dotdot(iname)) {
+ if (!IS_ENCRYPTED(dir) || fscrypt_is_dot_dotdot(iname)) {
fname->disk_name.name = (unsigned char *)iname->name;
fname->disk_name.len = iname->len;
return 0;