summaryrefslogtreecommitdiffstats
path: root/fs/crypto/hooks.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-07-24 11:07:58 -0700
committerEric Biggers <ebiggers@google.com>2019-08-12 19:04:44 -0700
commit886da8b39cf27995836062bb7fe5fd5cb764540a (patch)
treee6c29f00bbad95d27698e199951a8e0d8d2a7245 /fs/crypto/hooks.c
parent1c5100a2aab4143f36ca671c28189a8734d5381a (diff)
downloadlinux-stable-886da8b39cf27995836062bb7fe5fd5cb764540a.tar.gz
linux-stable-886da8b39cf27995836062bb7fe5fd5cb764540a.tar.bz2
linux-stable-886da8b39cf27995836062bb7fe5fd5cb764540a.zip
fscrypt: make fscrypt_msg() take inode instead of super_block
Most of the warning and error messages in fs/crypto/ are for situations related to a specific inode, not merely to a super_block. So to make things easier, make fscrypt_msg() take an inode rather than a super_block, and make it print the inode number. Note: This is the same approach I'm taking for fsverity_msg(). Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/crypto/hooks.c')
-rw-r--r--fs/crypto/hooks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index c1d6715d88e9..bb3b7fcfdd48 100644
--- a/fs/crypto/hooks.c
+++ b/fs/crypto/hooks.c
@@ -39,9 +39,9 @@ int fscrypt_file_open(struct inode *inode, struct file *filp)
dir = dget_parent(file_dentry(filp));
if (IS_ENCRYPTED(d_inode(dir)) &&
!fscrypt_has_permitted_context(d_inode(dir), inode)) {
- fscrypt_warn(inode->i_sb,
- "inconsistent encryption contexts: %lu/%lu",
- d_inode(dir)->i_ino, inode->i_ino);
+ fscrypt_warn(inode,
+ "Inconsistent encryption context (parent directory: %lu)",
+ d_inode(dir)->i_ino);
err = -EPERM;
}
dput(dir);