|
@@ -2390,11 +2390,12 @@ static int _nfs4_proc_open(struct nfs4_opendata *data)
|
|
|
nfs_fattr_map_and_free_names(server, &data->f_attr);
|
|
|
|
|
|
if (o_arg->open_flags & O_CREAT) {
|
|
|
- update_changeattr(dir, &o_res->cinfo);
|
|
|
if (o_arg->open_flags & O_EXCL)
|
|
|
data->file_created = 1;
|
|
|
else if (o_res->cinfo.before != o_res->cinfo.after)
|
|
|
data->file_created = 1;
|
|
|
+ if (data->file_created || dir->i_version != o_res->cinfo.after)
|
|
|
+ update_changeattr(dir, &o_res->cinfo);
|
|
|
}
|
|
|
if ((o_res->rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) == 0)
|
|
|
server->caps &= ~NFS_CAP_POSIX_LOCK;
|