diff options
author | David Gstir <david@sigma-star.at> | 2016-11-13 22:20:46 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-11-13 18:55:21 -0500 |
commit | 7821d4dd4589ce5af54f3e46d04a29439ba3c2e5 (patch) | |
tree | c9c424077630d6bec61a22905e7fec2cef9a9a8f /fs/f2fs/data.c | |
parent | b50f7b268bad8088dfe7579a65cd910d8cc5c40f (diff) | |
download | linux-7821d4dd4589ce5af54f3e46d04a29439ba3c2e5.tar.gz linux-7821d4dd4589ce5af54f3e46d04a29439ba3c2e5.tar.bz2 linux-7821d4dd4589ce5af54f3e46d04a29439ba3c2e5.zip |
fscrypt: Enable partial page encryption
Not all filesystems work on full pages, thus we should allow them to
hand partial pages to fscrypt for en/decryption.
Signed-off-by: David Gstir <david@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 9ae194fd2fdb..fac207254e8d 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1194,7 +1194,9 @@ int do_write_data_page(struct f2fs_io_info *fio) f2fs_wait_on_encrypted_page_writeback(F2FS_I_SB(inode), fio->old_blkaddr); retry_encrypt: + BUG_ON(!PageLocked(fio->page)); fio->encrypted_page = fscrypt_encrypt_page(inode, fio->page, + PAGE_SIZE, 0, gfp_flags); if (IS_ERR(fio->encrypted_page)) { err = PTR_ERR(fio->encrypted_page); |