Commit ea319d57 authored by Pavel Shilovsky's avatar Pavel Shilovsky Committed by Steve French

CIFS: Improve identation in cifs_unlock_range

Signed-off-by: default avatarPavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 0013fb4c
...@@ -1266,54 +1266,49 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, int xid) ...@@ -1266,54 +1266,49 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, int xid)
continue; continue;
if (types[i] != li->type) if (types[i] != li->type)
continue; continue;
if (!cinode->can_cache_brlcks) { if (cinode->can_cache_brlcks) {
/*
* We can cache brlock requests - simply remove
* a lock from the file's list.
*/
list_del(&li->llist);
cifs_del_lock_waiters(li);
kfree(li);
continue;
}
cur->Pid = cpu_to_le16(li->pid); cur->Pid = cpu_to_le16(li->pid);
cur->LengthLow = cpu_to_le32((u32)li->length); cur->LengthLow = cpu_to_le32((u32)li->length);
cur->LengthHigh = cur->LengthHigh = cpu_to_le32((u32)(li->length>>32));
cpu_to_le32((u32)(li->length>>32));
cur->OffsetLow = cpu_to_le32((u32)li->offset); cur->OffsetLow = cpu_to_le32((u32)li->offset);
cur->OffsetHigh = cur->OffsetHigh = cpu_to_le32((u32)(li->offset>>32));
cpu_to_le32((u32)(li->offset>>32));
/* /*
* We need to save a lock here to let us add * We need to save a lock here to let us add it again to
* it again to the file's list if the unlock * the file's list if the unlock range request fails on
* range request fails on the server. * the server.
*/ */
list_move(&li->llist, &tmp_llist); list_move(&li->llist, &tmp_llist);
if (++num == max_num) { if (++num == max_num) {
stored_rc = cifs_lockv(xid, tcon, stored_rc = cifs_lockv(xid, tcon, cfile->netfid,
cfile->netfid, li->type, num, 0, buf);
li->type, num,
0, buf);
if (stored_rc) { if (stored_rc) {
/* /*
* We failed on the unlock range * We failed on the unlock range
* request - add all locks from * request - add all locks from the tmp
* the tmp list to the head of * list to the head of the file's list.
* the file's list.
*/ */
cifs_move_llist(&tmp_llist, cifs_move_llist(&tmp_llist,
&cfile->llist); &cfile->llist);
rc = stored_rc; rc = stored_rc;
} else } else
/* /*
* The unlock range request * The unlock range request succeed -
* succeed - free the tmp list. * free the tmp list.
*/ */
cifs_free_llist(&tmp_llist); cifs_free_llist(&tmp_llist);
cur = buf; cur = buf;
num = 0; num = 0;
} else } else
cur++; cur++;
} else {
/*
* We can cache brlock requests - simply remove
* a lock from the file's list.
*/
list_del(&li->llist);
cifs_del_lock_waiters(li);
kfree(li);
}
} }
if (num) { if (num) {
stored_rc = cifs_lockv(xid, tcon, cfile->netfid, stored_rc = cifs_lockv(xid, tcon, cfile->netfid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment