linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH 1/3] fs: fcntl add set_flags wrapper
Date: Sat, 11 Oct 2014 06:37:41 -0700	[thread overview]
Message-ID: <20141011133741.GB29004@infradead.org> (raw)
In-Reply-To: <1412958576-32621-1-git-send-email-dmonakhov@openvz.org>

> +	else {
> +		spin_lock(&filp->f_lock);
> +		filp->f_flags = (arg & SETFL_MASK) |
> +			(filp->f_flags & ~SETFL_MASK);
> +		spin_unlock(&filp->f_lock);

Please move this into an exported generic_file_set_flags helper, that
the filesystems can use in their implementations instead of duplicating
it.

Also a more conceptual question:  Basically any check the filesystems
may perform needs to be duplicated in open and ->set_flags.  Any chance
to have the open path call into ->set_flags?


  parent reply	other threads:[~2014-10-11 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 16:29 [PATCH 1/3] fs: fcntl add set_flags wrapper Dmitry Monakhov
2014-10-10 16:29 ` [PATCH 2/3] fs: add fadvise file_operation Dmitry Monakhov
2014-10-10 16:29 ` [PATCH 3/3] ecryptfs: add fadvise/set_flags calbacks Dmitry Monakhov
2014-10-11 13:37 ` Christoph Hellwig [this message]
2014-10-14 15:30   ` [PATCH 1/3] fs: fcntl add set_flags wrapper Dmitry Monakhov

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=20141011133741.GB29004@infradead.org \
    --to=hch@infradead.org \
    --cc=dmonakhov@openvz.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).