diff options
author | Eric Biggers <ebiggers@google.com> | 2018-05-01 00:51:47 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-05-20 22:21:05 +0200 |
commit | 544d08fde258b4da72b6cfbe2d7172c86ce9860d (patch) | |
tree | 56d013a89974bd62e3ca974e090f495808edc64a /fs/crypto/hooks.c | |
parent | fscrypt: remove internal key size constants (diff) | |
download | linux-544d08fde258b4da72b6cfbe2d7172c86ce9860d.tar.xz linux-544d08fde258b4da72b6cfbe2d7172c86ce9860d.zip |
fscrypt: use a common logging function
Use a common function for fscrypt warning and error messages so that all
the messages are consistently ratelimited, include the "fscrypt:"
prefix, and include the filesystem name if applicable.
Also fix up a few of the log messages to be more descriptive.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto/hooks.c')
-rw-r--r-- | fs/crypto/hooks.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c index bec06490fb13..926e5df20ec3 100644 --- a/fs/crypto/hooks.c +++ b/fs/crypto/hooks.c @@ -39,8 +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)) { - pr_warn_ratelimited("fscrypt: inconsistent encryption contexts: %lu/%lu", - d_inode(dir)->i_ino, inode->i_ino); + fscrypt_warn(inode->i_sb, + "inconsistent encryption contexts: %lu/%lu", + d_inode(dir)->i_ino, inode->i_ino); err = -EPERM; } dput(dir); |