flock.c (cdfb26b40dfa51127d22d171cef4fe8993cbfb55) flock.c (79ddbfa500b37a94fa7501e65ebdd5c0e4c7592d)
1/* AFS file locking support
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 286 unchanged lines hidden (view full) ---

295 case AFS_VNODE_LOCK_NEED_UNLOCK:
296 afs_set_lock_state(vnode, AFS_VNODE_LOCK_UNLOCKING);
297 trace_afs_flock_ev(vnode, NULL, afs_flock_work_unlocking, 0);
298 spin_unlock(&vnode->lock);
299
300 /* attempt to release the server lock; if it fails, we just
301 * wait 5 minutes and it'll expire anyway */
302 ret = afs_release_lock(vnode, vnode->lock_key);
1/* AFS file locking support
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 286 unchanged lines hidden (view full) ---

295 case AFS_VNODE_LOCK_NEED_UNLOCK:
296 afs_set_lock_state(vnode, AFS_VNODE_LOCK_UNLOCKING);
297 trace_afs_flock_ev(vnode, NULL, afs_flock_work_unlocking, 0);
298 spin_unlock(&vnode->lock);
299
300 /* attempt to release the server lock; if it fails, we just
301 * wait 5 minutes and it'll expire anyway */
302 ret = afs_release_lock(vnode, vnode->lock_key);
303 if (ret < 0) {
303 if (ret < 0 && vnode->lock_state != AFS_VNODE_LOCK_DELETED) {
304 trace_afs_flock_ev(vnode, NULL, afs_flock_release_fail,
305 ret);
306 printk(KERN_WARNING "AFS:"
307 " Failed to release lock on {%llx:%llx} error %d\n",
308 vnode->fid.vid, vnode->fid.vnode, ret);
309 }
310
311 spin_lock(&vnode->lock);

--- 534 unchanged lines hidden ---
304 trace_afs_flock_ev(vnode, NULL, afs_flock_release_fail,
305 ret);
306 printk(KERN_WARNING "AFS:"
307 " Failed to release lock on {%llx:%llx} error %d\n",
308 vnode->fid.vid, vnode->fid.vnode, ret);
309 }
310
311 spin_lock(&vnode->lock);

--- 534 unchanged lines hidden ---