diff options
author | Jeff Layton | 2008-05-14 19:22:03 +0200 |
---|---|---|
committer | Steve French | 2008-05-14 20:45:30 +0200 |
commit | 35fc37d5175091c36d034a28c057da0f9594ee7e (patch) | |
tree | d28ee6f3000fd0c3a03fc95f044544b1d6413c08 /fs/cifs/inode.c | |
parent | clarify return value of cifs_convert_flags() (diff) | |
download | kernel-qcow2-linux-35fc37d5175091c36d034a28c057da0f9594ee7e.tar.gz kernel-qcow2-linux-35fc37d5175091c36d034a28c057da0f9594ee7e.tar.xz kernel-qcow2-linux-35fc37d5175091c36d034a28c057da0f9594ee7e.zip |
add function to convert access flags to legacy open mode
SMBLegacyOpen always opens a file as r/w. This could be problematic
for files with ATTR_READONLY set. Have it interpret the access_mode
into a sane open mode.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index fcbdbb6ad7bf..2d53b436d511 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1502,8 +1502,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) int oplock = 0; rc = SMBLegacyOpen(xid, pTcon, full_path, - FILE_OPEN, - SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, + FILE_OPEN, GENERIC_WRITE, CREATE_NOT_DIR, &netfid, &oplock, NULL, cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |