lkml.org 
[lkml]   [2022]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] hfsplus: Unmap the page in the "fail_page" label
From
Date


> On Aug 9, 2022, at 1:31 PM, Fabio M. De Francesco <fmdefrancesco@gmail.com> wrote:
>
> Several paths within hfs_btree_open() jump to the "fail_page" label
> where put_page() is called while the page is still mapped.
>
> Call kunmap() to unmap the page soon before put_page().
>
> Cc: Viacheslav Dubeyko <slava@dubeyko.com>
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
> fs/hfsplus/btree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
> index 66774f4cb4fd..3a917a9a4edd 100644
> --- a/fs/hfsplus/btree.c
> +++ b/fs/hfsplus/btree.c
> @@ -245,6 +245,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
> return tree;
>
> fail_page:
> + kunmap(page);
> put_page(page);
> free_inode:
> tree->inode->i_mapping->a_ops = &hfsplus_aops;
> --
> 2.37.1
>

Looks good.

Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>

Thanks,
Slava.


\
 
 \ /
  Last update: 2022-08-10 00:17    [W:0.458 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site