linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: gechangwei@live.cn, ghe@suse.com, jiangqi903@gmail.com,
	jlbec@evilplan.org,  junxiao.bi@oracle.com,
	Linux-MM <linux-mm@kvack.org>,
	mark@fasheh.com,  mm-commits@vger.kernel.org, piaojun@huawei.com,
	 stable <stable@vger.kernel.org>,
	sunny.s.zhang@oracle.com
Subject: Re: [patch 05/17] ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()
Date: Wed, 6 Nov 2019 08:41:44 -0800	[thread overview]
Message-ID: <CAHk-=wgZvzmijNca0rX+jcZZPPAdD8RSR0=5=vDB+1zUhHYD+w@mail.gmail.com> (raw)
In-Reply-To: <20191106051634.IwGqLbBvh%akpm@linux-foundation.org>

On Tue, Nov 5, 2019 at 9:16 PM <akpm@linux-foundation.org> wrote:
>
> From: Shuning Zhang <sunny.s.zhang@oracle.com>
> Subject: ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()
>
> When the extent tree is modified, it should be protected by inode cluster
> lock and ip_alloc_sem.
>
> The extent tree is accessed and modified in the
> ocfs2_prepare_inode_for_write, but isn't protected by ip_alloc_sem.

This patch results in a new warning for me:

  fs/ocfs2/file.c:2101:12: warning: ‘ocfs2_prepare_inode_for_refcount’
defined but not used [-Wunused-function]
   2101 | static int ocfs2_prepare_inode_for_refcount(struct inode *inode,
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and I'm wondering why nobody seems  to have noticed that or fixed
things? Because it does look like this removed the only use of that
function, and everybody who compiled this should have seen this
warning?

Was this not tested at all?

              Linus


  reply	other threads:[~2019-11-06 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  5:16 akpm
2019-11-06 16:41 ` Linus Torvalds [this message]
2019-11-06 18:09   ` Andrew Morton

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='CAHk-=wgZvzmijNca0rX+jcZZPPAdD8RSR0=5=vDB+1zUhHYD+w@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=gechangwei@live.cn \
    --cc=ghe@suse.com \
    --cc=jiangqi903@gmail.com \
    --cc=jlbec@evilplan.org \
    --cc=junxiao.bi@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mark@fasheh.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=piaojun@huawei.com \
    --cc=stable@vger.kernel.org \
    --cc=sunny.s.zhang@oracle.com \
    /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