projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crush: ensuring at most num-rep osds are selected
[cascardo/linux.git]
/
fs
/
locks.c
diff --git
a/fs/locks.c
b/fs/locks.c
index
f1bad68
..
40bc384
100644
(file)
--- a/
fs/locks.c
+++ b/
fs/locks.c
@@
-1388,9
+1388,8
@@
any_leases_conflict(struct inode *inode, struct file_lock *breaker)
int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
{
int error = 0;
int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
{
int error = 0;
- struct file_lock *new_fl;
struct file_lock_context *ctx = inode->i_flctx;
struct file_lock_context *ctx = inode->i_flctx;
- struct file_lock *
fl
;
+ struct file_lock *
new_fl, *fl, *tmp
;
unsigned long break_time;
int want_write = (mode & O_ACCMODE) != O_RDONLY;
LIST_HEAD(dispose);
unsigned long break_time;
int want_write = (mode & O_ACCMODE) != O_RDONLY;
LIST_HEAD(dispose);
@@
-1420,7
+1419,7
@@
int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
break_time++; /* so that 0 means no break time */
}
break_time++; /* so that 0 means no break time */
}
- list_for_each_entry
(fl
, &ctx->flc_lease, fl_list) {
+ list_for_each_entry
_safe(fl, tmp
, &ctx->flc_lease, fl_list) {
if (!leases_conflict(fl, new_fl))
continue;
if (want_write) {
if (!leases_conflict(fl, new_fl))
continue;
if (want_write) {
@@
-1728,7
+1727,7
@@
static int generic_delete_lease(struct file *filp, void *owner)
break;
}
}
break;
}
}
- trace_generic_delete_lease(inode,
fl
);
+ trace_generic_delete_lease(inode,
victim
);
if (victim)
error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose);
spin_unlock(&ctx->flc_lock);
if (victim)
error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose);
spin_unlock(&ctx->flc_lock);