diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2013-09-16 08:52:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-16 19:17:24 -0400 |
commit | 01c919abaf2f3d6a8e59eddf4ee22df1631ab067 (patch) | |
tree | 574456d59f55fbce54c7d95af4c900b1645dd836 /fs | |
parent | c5bf8fef52ce184bd48b76d1881df07b43f5091b (diff) |
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: Miklos Szeredi <mszeredi@suse.cz>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/dir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index de434f309af0..854a8f05a610 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1392,6 +1392,9 @@ static int nfs_finish_open(struct nfs_open_context *ctx, | |||
1392 | { | 1392 | { |
1393 | int err; | 1393 | int err; |
1394 | 1394 | ||
1395 | if ((open_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) | ||
1396 | *opened |= FILE_CREATED; | ||
1397 | |||
1395 | err = finish_open(file, dentry, do_open, opened); | 1398 | err = finish_open(file, dentry, do_open, opened); |
1396 | if (err) | 1399 | if (err) |
1397 | goto out; | 1400 | goto out; |