]> git.baikalelectronics.ru Git - kernel.git/commit
ext4 crypto: use a jbd2 transaction when adding a crypto policy
authorTheodore Ts'o <tytso@mit.edu>
Fri, 17 Jul 2015 15:16:47 +0000 (11:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Jul 2015 15:16:47 +0000 (11:16 -0400)
commit897887903bffdbf37ef6990c067d219f798d3e18
tree6d33a92a1ae98cdc792d304daf636882f48aedcb
parent8d167e725460ff5d55ffc7fa36f60f732d371814
ext4 crypto: use a jbd2 transaction when adding a crypto policy

Start a jbd2 transaction, and mark the inode dirty on the inode under
that transaction after setting the encrypt flag.  Otherwise if the
directory isn't modified after setting the crypto policy, the
encrypted flag might not survive the inode getting pushed out from
memory, or the the file system getting unmounted and remounted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/crypto_policy.c