From: "J. Bruce Fields" <bfields@fieldses.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
matthew@wil.cx
Subject: [PATCH] locks: remove unused lm_release_private
Date: Wed, 1 Aug 2012 07:56:16 -0400 [thread overview]
Message-ID: <20120801115616.GA3958@fieldses.org> (raw)
In-Reply-To: <CA+55aFzM8S0sEAAUXK9f1OhSL-OXmZ_jx_UHF81Eo0-Mi-+T_w@mail.gmail.com>
From: "J. Bruce Fields" <bfields@redhat.com>
3b6e2723f32de42028617f2c99b244ccd72cd959 "locks: prevent side-effects of
locks_release_private before file_lock is initialized" removed the last
user of lm_release_private without removing the field itself.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
Documentation/filesystems/Locking | 2 --
fs/locks.c | 6 +-----
include/linux/fs.h | 1 -
3 files changed, 1 insertion(+), 8 deletions(-)
On Tue, Jul 31, 2012 at 02:54:05PM -0700, Linus Torvalds wrote:
> Maybe I missed some odd user that somehow avoids the grep, but I don't
> think so. So there is nothing that ever sets it, why the hell does the
> thing still remain at all?
Embarassingly: I had work in progress that could make use of
lm_release_private soon, so I didn't bother removing it.
But "soon" was optimistic, and anyway why leave the code in a confusing
state, so: agreed it should have gone, apologies.
--b.
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 8e2da1e..f11d51f 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -343,7 +343,6 @@ prototypes:
int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
void (*lm_notify)(struct file_lock *); /* unblock callback */
int (*lm_grant)(struct file_lock *, struct file_lock *, int);
- void (*lm_release_private)(struct file_lock *);
void (*lm_break)(struct file_lock *); /* break_lease callback */
int (*lm_change)(struct file_lock **, int);
@@ -352,7 +351,6 @@ locking rules:
lm_compare_owner: yes no
lm_notify: yes no
lm_grant: no no
-lm_release_private: maybe no
lm_break: yes no
lm_change yes no
diff --git a/fs/locks.c b/fs/locks.c
index 541075a..5cf874c 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -200,11 +200,7 @@ void locks_release_private(struct file_lock *fl)
fl->fl_ops->fl_release_private(fl);
fl->fl_ops = NULL;
}
- if (fl->fl_lmops) {
- if (fl->fl_lmops->lm_release_private)
- fl->fl_lmops->lm_release_private(fl);
- fl->fl_lmops = NULL;
- }
+ fl->fl_lmops = NULL;
}
EXPORT_SYMBOL_GPL(locks_release_private);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a1e7727..9a6ac61 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1154,7 +1154,6 @@ struct lock_manager_operations {
int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
void (*lm_notify)(struct file_lock *); /* unblock callback */
int (*lm_grant)(struct file_lock *, struct file_lock *, int);
- void (*lm_release_private)(struct file_lock *);
void (*lm_break)(struct file_lock *);
int (*lm_change)(struct file_lock **, int);
};
--
1.7.9.5
prev parent reply other threads:[~2012-08-01 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 14:29 nfsd changes for 3.6 J. Bruce Fields
2012-07-31 14:29 ` J. Bruce Fields
2012-07-31 14:36 ` J. Bruce Fields
2012-07-31 21:54 ` Linus Torvalds
2012-07-31 21:54 ` Linus Torvalds
2012-08-01 11:56 ` J. Bruce Fields [this message]
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=20120801115616.GA3958@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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.