diff options
| author | James Morris <jmorris@namei.org> | 2010-05-06 10:56:07 +1000 | 
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2010-05-06 10:56:07 +1000 | 
| commit | 0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch) | |
| tree | 81b1a2305d16c873371b65c5a863c0268036cefe /fs/nfs/inode.c | |
| parent | 4e5d6f7ec3833c0da9cf34fa5c53c6058c5908b6 (diff) | |
| parent | 7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff) | |
| download | olio-linux-3.10-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.xz olio-linux-3.10-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.zip  | |
Merge branch 'master' into next
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 e358df75a6a..50a56edca0b 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;  |