]> git.baikalelectronics.ru Git - kernel.git/commit
fscrypt: pass up error codes from ->get_context()
authorEric Biggers <ebiggers@google.com>
Mon, 5 Dec 2016 19:12:48 +0000 (11:12 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 31 Dec 2016 21:26:21 +0000 (16:26 -0500)
commit4ddbc5b76e9b35c33f293fbdccd50961bcd6efb3
tree0bc8ffedf992cd2a6be13796baea2dfef67dfca6
parentffd57e447af3c8ace885e837b5491a8874f3e9a0
fscrypt: pass up error codes from ->get_context()

It was possible for the ->get_context() operation to fail with a
specific error code, which was then not returned to the caller of
FS_IOC_SET_ENCRYPTION_POLICY or FS_IOC_GET_ENCRYPTION_POLICY.  Make sure
to pass through these error codes.  Also reorganize the code so that
->get_context() only needs to be called one time when setting an
encryption policy, and handle contexts of unrecognized sizes more
appropriately.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/policy.c