linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Shilovsky <piastryyy@gmail.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Steve French <sfrench@samba.org>,
	linux-cifs <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cifs: Fix missed free operations
Date: Mon, 14 Oct 2019 14:43:11 -0700	[thread overview]
Message-ID: <CAKywueQY-J3g0RBF4=opP8SbhpWh-BHoHWzNEeTruxmfacnhGw@mail.gmail.com> (raw)
In-Reply-To: <20191014071531.12790-1-hslester96@gmail.com>

пн, 14 окт. 2019 г. в 00:18, Chuhong Yuan <hslester96@gmail.com>:
>
> cifs_setattr_nounix has two paths which miss free operations
> for xid and fullpath.
> Use goto cifs_setattr_exit like other paths to fix them.
>
> Fixes: aa081859b10c ("cifs: flush before set-info if we have writeable handles")
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
>  fs/cifs/inode.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 5dcc95b38310..df9377828e2f 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -2475,9 +2475,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
>                         rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
>                         cifsFileInfo_put(wfile);
>                         if (rc)
> -                               return rc;
> +                               goto cifs_setattr_exit;
>                 } else if (rc != -EBADF)
> -                       return rc;
> +                       goto cifs_setattr_exit;
>                 else
>                         rc = 0;
>         }
> --
> 2.20.1
>

Looks good, thanks.

Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

The original patch was tagged for stable, so, it seems that this one
should be tagged too.

--
Best regards,
Pavel Shilovsky

  reply	other threads:[~2019-10-14 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  7:15 [PATCH] cifs: Fix missed free operations Chuhong Yuan
2019-10-14 21:43 ` Pavel Shilovsky [this message]
2019-10-15  4:53   ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKywueQY-J3g0RBF4=opP8SbhpWh-BHoHWzNEeTruxmfacnhGw@mail.gmail.com' \
    --to=piastryyy@gmail.com \
    --cc=hslester96@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).