Re: [PATCH] exofs: fix hang on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 25, 2012 at 7:44 PM, Idan Kedar <idank@xxxxxxxxxx> wrote:
> if ore_write() fails, we would unlock the pages of pcol, which is now
> empty, rather than pcol_copy which owns the pages when ore_write() is
> called. this means that no pages will actually be unlocked
> (pcol.nr_pages == 0) and the writing process (more accurately, the
> syncing process) will hang waiting for a writeback notification that
> never comes.
>
> Signed-off-by: Idan Kedar <idank@xxxxxxxxxx>
> ---
>  fs/exofs/inode.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
> index b561810..bc5f1fe 100644
> --- a/fs/exofs/inode.c
> +++ b/fs/exofs/inode.c
> @@ -676,7 +676,7 @@ static int write_exec(struct page_collect *pcol)
>         return 0;
>
>  err:
> -       _unlock_pcol_pages(pcol, ret, WRITE);
> +       _unlock_pcol_pages(pcol->pages ? pcol : pcol_copy, ret, WRITE);
>         pcol_free(pcol);

come think of it, pcol_free(pcol) will leak the ore_io_state here, i'm
sending a new patch to fix that as well.

>         kfree(pcol_copy);
>
> --
> 1.7.6.5
>



-- 
idank
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux