EXPORT_SYMBOL(lock_may_write);
+void steal_locks(fl_owner_t from)
+{
+ struct list_head *tmp;
+
+ if (from == current->files)
+ return;
+
+ lock_kernel();
+ list_for_each(tmp, &file_lock_list) {
+ struct file_lock *fl = list_entry(tmp, struct file_lock, fl_link);
+ if (fl->fl_owner == from)
+ fl->fl_owner = current->files;
+ }
+ unlock_kernel();
+}
+
+EXPORT_SYMBOL(steal_locks);
+
static int __init filelock_init(void)
{
filelock_cache = kmem_cache_create("file_lock_cache",
extern void lease_get_mtime(struct inode *, struct timespec *time);
extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
+extern void steal_locks(fl_owner_t from);
struct fasync_struct {
int magic;