diff --git a/[refs] b/[refs] index 7bd9d46d4c84..ac9eecc443b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80e60639f1b7c121a7fea53920c5a4b94009361a +refs/heads/master: 1544fa0f7a46241582abc48f07b74f3d846379e4 diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index 737128f777f3..50a56edca0b5 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -623,10 +623,10 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c list_for_each_entry(pos, &nfsi->open_files, list) { if (cred != NULL && pos->cred != cred) continue; - if ((pos->mode & mode) == mode) { - ctx = get_nfs_open_context(pos); - break; - } + if ((pos->mode & (FMODE_READ|FMODE_WRITE)) != mode) + continue; + ctx = get_nfs_open_context(pos); + break; } spin_unlock(&inode->i_lock); return ctx;