From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Miklos Szeredi <mszeredi@suse.cz>,
Andy Adamson <andros@netapp.com>,
Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: linux-next: manual merge of the vfs tree with the nfs tree
Date: Mon, 2 Jul 2012 11:36:09 +1000 [thread overview]
Message-ID: <20120702113609.f466f618f983d93de5e167ce@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]
Hi Al,
Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/nfs4proc.c between commit 6e5b587d2f42 ("NFSv4.1 handle OPEN
O_CREATE mdsthreshold") from the nfs tree and commit 2cca3fbfc12b ("nfs:
clean up ->create in nfs_rpc_ops") from the vfs tree.
I fixed it up (I think - see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc fs/nfs/nfs4proc.c
index 7d387cb,267be3c..0000000
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@@ -2804,39 -2779,22 +2804,25 @@@ static int nfs4_proc_readlink(struct in
}
/*
- * Got race?
- * We will need to arrange for the VFS layer to provide an atomic open.
- * Until then, this create/open method is prone to inefficiency and race
- * conditions due to the lookup, create, and open VFS calls from sys_open()
- * placed on the wire.
- *
- * Given the above sorry state of affairs, I'm simply sending an OPEN.
- * The file will be opened again in the subsequent VFS open call
- * (nfs4_proc_file_open).
- *
- * The open for read will just hang around to be used by any process that
- * opens the file O_RDONLY. This will all be resolved with the VFS changes.
+ * This is just for mknod. open(O_CREAT) will always do ->open_context().
*/
-
static int
nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
- int flags, struct nfs_open_context *ctx)
+ int flags)
{
- struct dentry *de = dentry;
+ struct nfs_open_context *ctx;
struct nfs4_state *state;
- struct rpc_cred *cred = NULL;
+ struct nfs4_threshold **thp = NULL;
- fmode_t fmode = 0;
int status = 0;
- if (ctx != NULL) {
- cred = ctx->cred;
- de = ctx->dentry;
- fmode = ctx->mode;
+ ctx = alloc_nfs_open_context(dentry, FMODE_READ);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
+
++ if (ctx != NULL)
+ thp = &ctx->mdsthreshold;
- }
sattr->ia_mode &= ~current_umask();
- state = nfs4_do_open(dir, de, fmode, flags, sattr, cred, thp);
- state = nfs4_do_open(dir, dentry, ctx->mode, flags, sattr, ctx->cred, NULL);
++ state = nfs4_do_open(dir, dentry, ctx->mode, flags, sattr, ctx->cred, thp);
d_drop(dentry);
if (IS_ERR(state)) {
status = PTR_ERR(state);
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-07-02 1:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 1:36 Stephen Rothwell [this message]
2012-07-21 23:56 linux-next: manual merge of the vfs tree with the nfs tree Stephen Rothwell
2016-01-11 1:16 Stephen Rothwell
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=20120702113609.f466f618f983d93de5e167ce@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=andros@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mszeredi@suse.cz \
--cc=trond.myklebust@fys.uio.no \
--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).