diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 18:24:04 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-17 18:24:04 +0200 |
commit | ac1d426e825ab5778995f2f6f053ca2e6b45c622 (patch) | |
tree | 75b91356ca39463e0112931aa6790802fb1e07a2 /fs/nfs/inode.c | |
parent | Merge branch 'devel-pmu' into devel (diff) | |
parent | Merge branch 'for-rmk/2635' of git://git.fluff.org/bjdooks/linux into devel-s... (diff) | |
download | linux-ac1d426e825ab5778995f2f6f053ca2e6b45c622.tar.xz linux-ac1d426e825ab5778995f2f6f053ca2e6b45c622.zip |
Merge branch 'devel-stable' into devel
Conflicts:
arch/arm/Kconfig
arch/arm/include/asm/system.h
arch/arm/mm/Kconfig
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e358df75a6ad..50a56edca0b5 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -36,6 +36,7 @@ #include <linux/vfs.h> #include <linux/inet.h> #include <linux/nfs_xdr.h> +#include <linux/slab.h> #include <asm/system.h> #include <asm/uaccess.h> @@ -622,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; |