Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01c919ab authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

nfs: set FILE_CREATED



Set FILE_CREATED on O_CREAT|O_EXCL.  If the NFS server honored our request
for exclusivity then this must be correct.

Currently this is a no-op, since the VFS sets FILE_CREATED anyway.  The
next patch will, however, require this flag to be always set by
filesystems.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c5bf8fef
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1392,6 +1392,9 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
{
	int err;

	if ((open_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
		*opened |= FILE_CREATED;

	err = finish_open(file, dentry, do_open, opened);
	if (err)
		goto out;