diff options
Diffstat (limited to 'fs/f2fs/crypto_policy.c')
-rw-r--r-- | fs/f2fs/crypto_policy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/crypto_policy.c b/fs/f2fs/crypto_policy.c index d4a96af513c2..596f02490f27 100644 --- a/fs/f2fs/crypto_policy.c +++ b/fs/f2fs/crypto_policy.c @@ -192,7 +192,8 @@ int f2fs_inherit_context(struct inode *parent, struct inode *child, return res; ci = F2FS_I(parent)->i_crypt_info; - BUG_ON(ci == NULL); + if (ci == NULL) + return -ENOKEY; ctx.format = F2FS_ENCRYPTION_CONTEXT_FORMAT_V1; |