aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_file.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-08-03 19:55:32 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 11:40:21 -0700
commita111278ea956e42e2d1ac4b4f04a2c71d322235b (patch)
treeed4dec0ef5ce9447f05b4836c0bc4534886aeecb /fs/9p/vfs_file.c
parent29a3e8657d2a2640384166e3fe29a086d235fc33 (diff)
downloadkernel_samsung_smdk4412-a111278ea956e42e2d1ac4b4f04a2c71d322235b.zip
kernel_samsung_smdk4412-a111278ea956e42e2d1ac4b4f04a2c71d322235b.tar.gz
kernel_samsung_smdk4412-a111278ea956e42e2d1ac4b4f04a2c71d322235b.tar.bz2
fs/9p: Add OS dependent open flags in 9p protocol
commit f88657ce3f9713a0c62101dffb0e972a979e77b9 upstream. Some of the flags are OS/arch dependent we add a 9p protocol value which maps to asm-generic/fcntl.h values in Linux Based on the original patch from Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> [extra comments from author as to why this needs to go to stable: Earlier for different operation such as open we used the values of open flag as defined by the OS. But some of these flags such as O_DIRECT are arch dependent. So if we have the 9p client and server running on different architectures, we end up with client sending client architecture value of these open flag and server will try to map these values to what its architecture states. For ex: O_DIRECT on a x86 client maps to #define O_DIRECT 00040000 Where as on sparc server it will maps to #define O_DIRECT 0x100000 Hence we need to map these open flags to OS/arch independent flag values. Getting these changes to an early version of kernel ensures us that we work with different combination of client and server. We should ideally backport this patch to all possible kernel version.] Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/9p/vfs_file.c')
-rw-r--r--fs/9p/vfs_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index ffed558..56907e4 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -65,7 +65,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
v9inode = V9FS_I(inode);
v9ses = v9fs_inode2v9ses(inode);
if (v9fs_proto_dotl(v9ses))
- omode = file->f_flags;
+ omode = v9fs_open_to_dotl_flags(file->f_flags);
else
omode = v9fs_uflags2omode(file->f_flags,
v9fs_proto_dotu(v9ses));