From 886da8b39cf27995836062bb7fe5fd5cb764540a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 24 Jul 2019 11:07:58 -0700 Subject: 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 --- fs/crypto/fname.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'fs/crypto/fname.c') diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index 6f9daba99168..5cab3bb2d1fc 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -71,9 +71,7 @@ int fname_encrypt(struct inode *inode, const struct qstr *iname, res = crypto_wait_req(crypto_skcipher_encrypt(req), &wait); skcipher_request_free(req); if (res < 0) { - fscrypt_err(inode->i_sb, - "Filename encryption failed for inode %lu: %d", - inode->i_ino, res); + fscrypt_err(inode, "Filename encryption failed: %d", res); return res; } @@ -117,9 +115,7 @@ static int fname_decrypt(struct inode *inode, res = crypto_wait_req(crypto_skcipher_decrypt(req), &wait); skcipher_request_free(req); if (res < 0) { - fscrypt_err(inode->i_sb, - "Filename decryption failed for inode %lu: %d", - inode->i_ino, res); + fscrypt_err(inode, "Filename decryption failed: %d", res); return res; } -- cgit v1.2.3