fscrypt: new helper function - fscrypt_prepare_setattr()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2017 19:15:44 +0000 (12:15 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 5 Jan 2018 02:14:07 +0000 (18:14 -0800)
commit249c90416bcf28feb19480207481e6a362f6aa32
treea17627a14f23bfe49b70b9f938a1b5858fc3075a
parent91d09c0521325019f5fc9bdaf5d4d60e3dafc355
fscrypt: new helper function - fscrypt_prepare_setattr()

Introduce a helper function for filesystems to call when processing
->setattr() on a possibly-encrypted inode.  It handles enforcing that an
encrypted file can only be truncated if its encryption key is available.

Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
include/linux/fscrypt.h