Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273542
b: refs/heads/master
c: 5079276
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Oct 30, 2011
1 parent b4b51f7 commit b41a3fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ea00c6977d8b1463ee86d6689c8ef35ee2529a0
refs/heads/master: 5079276066cc421b48a6a63a54a34775979e8506
10 changes: 8 additions & 2 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,9 @@ cifs_posix_lock_test(struct file *file, struct file_lock *flock)
struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode);
unsigned char saved_type = flock->fl_type;

if ((flock->fl_flags & FL_POSIX) == 0)
return 1;

mutex_lock(&cinode->lock_mutex);
posix_test_lock(file, flock);

Expand All @@ -809,12 +812,15 @@ static int
cifs_posix_lock_set(struct file *file, struct file_lock *flock)
{
struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode);
int rc;
int rc = 1;

if ((flock->fl_flags & FL_POSIX) == 0)
return rc;

mutex_lock(&cinode->lock_mutex);
if (!cinode->can_cache_brlcks) {
mutex_unlock(&cinode->lock_mutex);
return 1;
return rc;
}
rc = posix_lock_file_wait(file, flock);
mutex_unlock(&cinode->lock_mutex);
Expand Down

0 comments on commit b41a3fa

Please sign in to comment.