Skip to content

Commit bb8430a

Browse files
Christoph Hellwigtorvalds
authored andcommitted
locks: remove fl_copy_lock lock_manager operation
This one was only used for a nasty hack in nfsd, which has recently been removed. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 51ee4b8 commit bb8430a

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

‎Documentation/filesystems/Locking‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,13 @@ fl_release_private: yes yes
322322
prototypes:
323323
int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
324324
void (*fl_notify)(struct file_lock *); /* unblock callback */
325-
void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
326325
void (*fl_release_private)(struct file_lock *);
327326
void (*fl_break)(struct file_lock *); /* break_lease callback */
328327

329328
locking rules:
330329
BKL may block
331330
fl_compare_owner: yes no
332331
fl_notify: yes no
333-
fl_copy_lock: yes no
334332
fl_release_private: yes yes
335333
fl_break: yes no
336334

‎fs/locks.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,8 @@ static void locks_copy_private(struct file_lock *new, struct file_lock *fl)
235235
fl->fl_ops->fl_copy_lock(new, fl);
236236
new->fl_ops = fl->fl_ops;
237237
}
238-
if (fl->fl_lmops) {
239-
if (fl->fl_lmops->fl_copy_lock)
240-
fl->fl_lmops->fl_copy_lock(new, fl);
238+
if (fl->fl_lmops)
241239
new->fl_lmops = fl->fl_lmops;
242-
}
243240
}
244241

245242
/*

‎include/linux/fs.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,6 @@ struct lock_manager_operations {
10561056
int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
10571057
void (*fl_notify)(struct file_lock *); /* unblock callback */
10581058
int (*fl_grant)(struct file_lock *, struct file_lock *, int);
1059-
void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
10601059
void (*fl_release_private)(struct file_lock *);
10611060
void (*fl_break)(struct file_lock *);
10621061
int (*fl_mylease)(struct file_lock *, struct file_lock *);

0 commit comments

Comments
 (0)