Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352967
b: refs/heads/master
c: 9a99af4
h: refs/heads/master
i:
  352965: f826ba6
  352963: c82adda
  352959: 1a4448f
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 11, 2013
1 parent 4d37a48 commit e8a000d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c137afabe330f64eddcd4dd281258807e27fd430
refs/heads/master: 9a99af494bd7141d567d00b5ef94b141821e158c
9 changes: 9 additions & 0 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4813,8 +4813,10 @@ static int nfs41_lock_expired(struct nfs4_state *state, struct file_lock *reques

static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
struct nfs4_state_owner *sp = state->owner;
struct nfs_inode *nfsi = NFS_I(state->inode);
unsigned char fl_flags = request->fl_flags;
unsigned int seq;
int status = -ENOLCK;

if ((fl_flags & FL_POSIX) &&
Expand All @@ -4836,9 +4838,16 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
status = do_vfs_lock(request->fl_file, request);
goto out_unlock;
}
seq = raw_seqcount_begin(&sp->so_reclaim_seqcount);
up_read(&nfsi->rwsem);
status = _nfs4_do_setlk(state, cmd, request, NFS_LOCK_NEW);
if (status != 0)
goto out;
down_read(&nfsi->rwsem);
if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq)) {
status = -NFS4ERR_DELAY;
goto out_unlock;
}
/* Note: we always want to sleep here! */
request->fl_flags = fl_flags | FL_SLEEP;
if (do_vfs_lock(request->fl_file, request) < 0)
Expand Down

0 comments on commit e8a000d

Please sign in to comment.