summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-13 15:10:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-13 15:10:16 -0700
commit0fdfe5ad2802e747460bf48eb2eb0ca3d3f3af42 (patch)
tree1358c7920438e090605695f6fb8e7989eb3f8998 /fs/nfs/inode.c
parent44d2d371d250b44cbe40f8d47e329c97668d7594 (diff)
parent0df5dd4aae211edeeeb84f7f84f6d093406d7c22 (diff)
downloadop-kernel-dev-0fdfe5ad2802e747460bf48eb2eb0ca3d3f3af42.zip
op-kernel-dev-0fdfe5ad2802e747460bf48eb2eb0ca3d3f3af42.tar.gz
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFSv4: fix delegated locking NFS: Ensure that the WRITE and COMMIT RPC calls are always uninterruptible NFS: Fix a race with the new commit code NFS: Ensure that writeback_single_inode() calls write_inode() when syncing NFS: Fix the mode calculation in nfs_find_open_context NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 737128f..50a56ed 100644
--- a/fs/nfs/inode.c
+++ b/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;
OpenPOWER on IntegriCloud