On 10/16/2010 01:03 AM, Jeff Layton wrote: > 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@xxxxxxxxxx> > --- > fs/cifs/cifsproto.h | 2 +- > fs/cifs/dir.c | 99 +++------------------------------------------ > fs/cifs/file.c | 113 +++++++++++++++++++++++++++++++++++++++----------- > 3 files changed, 95 insertions(+), 119 deletions(-) Nice cleanup. Looks good to me. Reviewed-by: Suresh Jayaraman <sjayaraman@xxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html