Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 01/13] cifs: fix flags handling in cifs_posix_open
Date: Sun, 17 Oct 2010 20:38:04 +0530	[thread overview]
Message-ID: <4CBB1154.1020101@suse.de> (raw)
In-Reply-To: <1287171248-464-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  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-l3A5Bk7waGM@public.gmane.org>

  parent reply	other threads:[~2010-10-17 15:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15 19:33 [PATCH 00/13] cifs: clean up management of open filehandles (try #5) Jeff Layton
     [not found] ` <1287171248-464-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-15 19:33   ` [PATCH 01/13] cifs: fix flags handling in cifs_posix_open Jeff Layton
     [not found]     ` <1287171248-464-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-17 15:08       ` Suresh Jayaraman [this message]
2010-10-15 19:33   ` [PATCH 02/13] cifs: eliminate oflags option from cifs_new_fileinfo Jeff Layton
     [not found]     ` <1287171248-464-3-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-17 15:08       ` Suresh Jayaraman
     [not found]         ` <4CBB1182.5050009-l3A5Bk7waGM@public.gmane.org>
2010-10-18  0:59           ` Steve French
2010-10-15 19:33   ` [PATCH 03/13] cifs: eliminate the inode argument " Jeff Layton
2010-10-15 19:33   ` [PATCH 04/13] cifs: clean up cifs_reopen_file Jeff Layton
2010-10-15 19:34   ` [PATCH 05/13] cifs: cifs_write argument change and cleanup Jeff Layton
2010-10-15 19:34   ` [PATCH 06/13] cifs: eliminate pfile pointer from cifsFileInfo Jeff Layton
2010-10-15 19:34   ` [PATCH 07/13] cifs: move cifs_new_fileinfo to file.c Jeff Layton
     [not found]     ` <1287171248-464-8-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-18  1:26       ` Steve French
2010-10-15 19:34   ` [PATCH 08/13] cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock Jeff Layton
     [not found]     ` <1287171248-464-9-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-18  1:34       ` Steve French
2010-10-15 19:34   ` [PATCH 09/13] cifs: move cifsFileInfo_put to file.c Jeff Layton
2010-10-15 19:34   ` [PATCH 10/13] cifs: move close processing from cifs_close to cifsFileInfo_put Jeff Layton
2010-10-15 19:34   ` [PATCH 11/13] cifs: convert cifsFileInfo->count to non-atomic counter Jeff Layton
     [not found]     ` <1287171248-464-12-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-23 16:57       ` Steve French
     [not found]         ` <AANLkTimfSq1vrGjcdLRh5+p=t0oF9ouEOzaVsE5vcZBq-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-24  1:09           ` Jeff Layton
2010-10-15 19:34   ` [PATCH 12/13] cifs: wait for writeback to complete in cifs_flush Jeff Layton
2010-10-15 19:34   ` [PATCH 13/13] cifs: eliminate cifsInodeInfo->write_behind_rc Jeff Layton
     [not found]     ` <1287171248-464-14-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-22 18:11       ` Dave Kleikamp
2010-10-22 18:20         ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBB1154.1020101@suse.de \
    --to=sjayaraman-l3a5bk7wagm@public.gmane.org \
    --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox