diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-10-15 19:33:56 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-18 00:34:29 (GMT) |
commit | 608712fe8609492a8670638ea86b97fafe49ebba (patch) | |
tree | b175e2ac5e71ab8d6541a82d496d5dc6cc812acf /fs/cifs/cifsproto.h | |
parent | 2f4f26fcf393ef4a44abe10e79c1966e64e86055 (diff) | |
download | linux-fsl-qoriq-608712fe8609492a8670638ea86b97fafe49ebba.tar.xz |
cifs: fix flags handling in cifs_posix_open
The way flags are passed and converted for cifs_posix_open is rather
non-sensical. Some callers call cifs_posix_convert_flags on the flags
before they pass them to cifs_posix_open, whereas some don't. Two flag
conversion steps is just confusing though.
Change the function instead to clearly expect input in f_flags format,
and fix the callers to pass that in. Then, have cifs_posix_open call
cifs_convert_posix_flags to do the conversion. Move cifs_posix_open to
file.c as well so we can keep cifs_convert_posix_flags as a static
function.
Fix it also to not ignore O_CREAT, O_EXCL and O_TRUNC, and instead have
cifs_reopen_file mask those bits off before calling cifs_posix_open.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 7f416ab..4f7edba 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -111,7 +111,7 @@ extern struct cifsFileInfo *cifs_new_fileinfo(struct inode *newinode, unsigned int oflags, __u32 oplock); extern int cifs_posix_open(char *full_path, struct inode **pinode, struct super_block *sb, - int mode, int oflags, + int mode, unsigned int f_flags, __u32 *poplock, __u16 *pnetfid, int xid); void cifs_fill_uniqueid(struct super_block *sb, struct cifs_fattr *fattr); extern void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, |