aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-22 10:18:42 -0400
committerJeff Layton <jlayton@primarydata.com>2014-09-09 16:01:06 -0400
commitd0449b90f80f263e17e8b3ce31442e45121dc46c (patch)
treeccf93559ff2721b5d5ea702e49d8689e44ae13d0
parentf39b913cee67e401ad697578baca0ba34830209b (diff)
locks: Remove unused conf argument from lm_grant
This argument is always NULL so don't pass it around. [jlayton: remove dependencies on previous patches in series] Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Layton <jlayton@primarydata.com>
-rw-r--r--fs/dlm/plock.c8
-rw-r--r--fs/lockd/svclock.c12
-rw-r--r--include/linux/fs.h2
3 files changed, 8 insertions, 14 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index f704458ea5f5..e0ab3a93eeff 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -30,7 +30,7 @@ struct plock_op {
30 30
31struct plock_xop { 31struct plock_xop {
32 struct plock_op xop; 32 struct plock_op xop;
33 void *callback; 33 int (*callback)(struct file_lock *fl, int result);
34 void *fl; 34 void *fl;
35 void *file; 35 void *file;
36 struct file_lock flc; 36 struct file_lock flc;
@@ -190,7 +190,7 @@ static int dlm_plock_callback(struct plock_op *op)
190 struct file *file; 190 struct file *file;
191 struct file_lock *fl; 191 struct file_lock *fl;
192 struct file_lock *flc; 192 struct file_lock *flc;
193 int (*notify)(void *, void *, int) = NULL; 193 int (*notify)(struct file_lock *fl, int result) = NULL;
194 struct plock_xop *xop = (struct plock_xop *)op; 194 struct plock_xop *xop = (struct plock_xop *)op;
195 int rv = 0; 195 int rv = 0;
196 196
@@ -209,7 +209,7 @@ static int dlm_plock_callback(struct plock_op *op)
209 notify = xop->callback; 209 notify = xop->callback;
210 210
211 if (op->info.rv) { 211 if (op->info.rv) {
212 notify(fl, NULL, op->info.rv); 212 notify(fl, op->info.rv);
213 goto out; 213 goto out;
214 } 214 }
215 215
@@ -228,7 +228,7 @@ static int dlm_plock_callback(struct plock_op *op)
228 (unsigned long long)op->info.number, file, fl); 228 (unsigned long long)op->info.number, file, fl);
229 } 229 }
230 230
231 rv = notify(fl, NULL, 0); 231 rv = notify(fl, 0);
232 if (rv) { 232 if (rv) {
233 /* XXX: We need to cancel the fs lock here: */ 233 /* XXX: We need to cancel the fs lock here: */
234 log_print("dlm_plock_callback: lock granted after lock request " 234 log_print("dlm_plock_callback: lock granted after lock request "
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index ab798a88ec1d..2a6170133c1d 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -667,22 +667,16 @@ nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *l
667 * deferred rpc for GETLK and SETLK. 667 * deferred rpc for GETLK and SETLK.
668 */ 668 */
669static void 669static void
670nlmsvc_update_deferred_block(struct nlm_block *block, struct file_lock *conf, 670nlmsvc_update_deferred_block(struct nlm_block *block, int result)
671 int result)
672{ 671{
673 block->b_flags |= B_GOT_CALLBACK; 672 block->b_flags |= B_GOT_CALLBACK;
674 if (result == 0) 673 if (result == 0)
675 block->b_granted = 1; 674 block->b_granted = 1;
676 else 675 else
677 block->b_flags |= B_TIMED_OUT; 676 block->b_flags |= B_TIMED_OUT;
678 if (conf) {
679 if (block->b_fl)
680 __locks_copy_lock(block->b_fl, conf);
681 }
682} 677}
683 678
684static int nlmsvc_grant_deferred(struct file_lock *fl, struct file_lock *conf, 679static int nlmsvc_grant_deferred(struct file_lock *fl, int result)
685 int result)
686{ 680{
687 struct nlm_block *block; 681 struct nlm_block *block;
688 int rc = -ENOENT; 682 int rc = -ENOENT;
@@ -697,7 +691,7 @@ static int nlmsvc_grant_deferred(struct file_lock *fl, struct file_lock *conf,
697 rc = -ENOLCK; 691 rc = -ENOLCK;
698 break; 692 break;
699 } 693 }
700 nlmsvc_update_deferred_block(block, conf, result); 694 nlmsvc_update_deferred_block(block, result);
701 } else if (result == 0) 695 } else if (result == 0)
702 block->b_granted = 1; 696 block->b_granted = 1;
703 697
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 94187721ad41..908af4f81680 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -869,7 +869,7 @@ struct lock_manager_operations {
869 int (*lm_compare_owner)(struct file_lock *, struct file_lock *); 869 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
870 unsigned long (*lm_owner_key)(struct file_lock *); 870 unsigned long (*lm_owner_key)(struct file_lock *);
871 void (*lm_notify)(struct file_lock *); /* unblock callback */ 871 void (*lm_notify)(struct file_lock *); /* unblock callback */
872 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 872 int (*lm_grant)(struct file_lock *, int);
873 void (*lm_break)(struct file_lock *); 873 void (*lm_break)(struct file_lock *);
874 int (*lm_change)(struct file_lock **, int); 874 int (*lm_change)(struct file_lock **, int);
875}; 875};