diff options
author | Clark Williams <williams@redhat.com> | 2012-04-14 09:13:39 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-14 09:13:39 -0500 |
commit | 4905660cd237e4c4ede46920851caa12739f006f (patch) | |
tree | ef37e7c9f52c9ae9c2b206658556f37d67fe43eb /fs/cifs/file.c | |
parent | 1b5e39fc18a1b8ff7ea425ce5f49307cb28a880f (diff) | |
parent | 0147c2ae9d602b5791dae30322ece475271acd10 (diff) |
Merge commit 'v3.2.15' into rt-3.2.15-rt24v3.2.15-rt24
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 159fcc56dc2d..0f7dc228c10a 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -835,13 +835,21 @@ cifs_posix_lock_set(struct file *file, struct file_lock *flock) if ((flock->fl_flags & FL_POSIX) == 0) return rc; +try_again: mutex_lock(&cinode->lock_mutex); if (!cinode->can_cache_brlcks) { mutex_unlock(&cinode->lock_mutex); return rc; } - rc = posix_lock_file_wait(file, flock); + + rc = posix_lock_file(file, flock, NULL); mutex_unlock(&cinode->lock_mutex); + if (rc == FILE_LOCK_DEFERRED) { + rc = wait_event_interruptible(flock->fl_wait, !flock->fl_next); + if (!rc) + goto try_again; + locks_delete_block(flock); + } return rc; } |