diff options
| author | 2010-04-29 09:36:24 +0200 | |
|---|---|---|
| committer | 2010-04-29 09:36:24 +0200 | |
| commit | 7407cf355fdf5500430be966dbbde84a27293bad (patch) | |
| tree | 922861288ff38558ed721a79653f52b17b13bb95 /fs/nfs/inode.c | |
| parent | nilfs: fix breakage caused by barrier flag changes (diff) | |
| parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 (diff) | |
| download | wireguard-linux-7407cf355fdf5500430be966dbbde84a27293bad.tar.xz wireguard-linux-7407cf355fdf5500430be966dbbde84a27293bad.zip | |
Merge branch 'master' into for-2.6.35
Conflicts:
fs/block_dev.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/nfs/inode.c')
| -rw-r--r-- | fs/nfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 737128f777f3..50a56edca0b5 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; |
