diff options
author | Eric Biggers <ebiggers@google.com> | 2019-08-04 19:35:49 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-08-12 19:18:50 -0700 |
commit | 62de25927a2558324f2f425545cdc90682168ca9 (patch) | |
tree | 975849998d154fcc2e97cef387e5d1346df523bc /fs/ubifs/super.c | |
parent | 8ce589c773180f15d9ef426679a92909e8233dbe (diff) |
ubifs: wire up new fscrypt ioctls
Wire up the new ioctls for adding and removing fscrypt keys to/from the
filesystem, and the new ioctl for retrieving v2 encryption policies.
The key removal ioctls also required making UBIFS use
fscrypt_drop_inode().
For more details see Documentation/filesystems/fscrypt.rst and the
fscrypt patches that added the implementation of these ioctls.
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 2c0803b0ac3a..3ad6620f14fb 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -318,6 +318,16 @@ static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc) return err; } +static int ubifs_drop_inode(struct inode *inode) +{ + int drop = generic_drop_inode(inode); + + if (!drop) + drop = fscrypt_drop_inode(inode); + + return drop; +} + static void ubifs_evict_inode(struct inode *inode) { int err; @@ -1990,6 +2000,7 @@ const struct super_operations ubifs_super_operations = { .free_inode = ubifs_free_inode, .put_super = ubifs_put_super, .write_inode = ubifs_write_inode, + .drop_inode = ubifs_drop_inode, .evict_inode = ubifs_evict_inode, .statfs = ubifs_statfs, .dirty_inode = ubifs_dirty_inode, |