From: Miklos Szeredi Date: Mon, 16 Sep 2013 12:52:04 +0000 (+0200) Subject: nfs: set FILE_CREATED X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01c919abaf2f3d6a8e59eddf4ee22df1631ab067;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: Trond Myklebust Signed-off-by: Al Viro --- 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, { 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;