All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Christoph Hellwig <hch@lst.de>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH, RFC] lockd: stop abusing file_lock_list
Date: Thu, 16 Feb 2006 11:23:56 +0100	[thread overview]
Message-ID: <20060216102355.GK4203@suse.de> (raw)
In-Reply-To: <1140065071.8209.3.camel@lade.trondhjem.org>

On Wed, Feb 15 2006, Trond Myklebust wrote:
>  static void nlmclnt_locks_release_private(struct file_lock *fl)
>  {
>  	nlm_put_lockowner(fl->fl_u.nfs_fl.owner);
>  	fl->fl_ops = NULL;
> +	if (!list_empty(&fl->fl_u.nfs_fl.list))
> +		list_del(&fl->fl_u.nfs_fl.list);
>  }

This looks fishy, if invoked twice both will return !list_empty() -
list_del_init()?

Why not just always use list_del_init(), if you have to add these checks
anyways? A double list_del_init() doesn't cause any harm.

-- 
Jens Axboe


  reply	other threads:[~2006-02-16 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 19:20 [PATCH, RFC] lockd: stop abusing file_lock_list Christoph Hellwig
2006-02-14 22:27 ` Trond Myklebust
2006-02-16  4:44   ` Trond Myklebust
2006-02-16 10:23     ` Jens Axboe [this message]
2006-02-16 13:46       ` Trond Myklebust
2006-02-16 13:57     ` Christoph Hellwig
2006-02-16 14:21       ` Trond Myklebust

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=20060216102355.GK4203@suse.de \
    --to=axboe@suse.de \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.