diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-10-13 16:00:16 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-17 17:50:00 -0400 |
commit | 32513b40efdc693b3675f1c691ab901518fbcb6a (patch) | |
tree | 7d39ddbe4e421061f96d3dd5d64866b27117fd90 /fs/nfsd/xdr4.h | |
parent | d29b20cd589128a599e5045d4effc2d7dbc388f5 (diff) | |
download | linux-32513b40efdc693b3675f1c691ab901518fbcb6a.tar.bz2 |
nfsd4: preallocate nfs4_file in process_open1()
Creating a new file is an irrevocable step--once it's visible in the
filesystem, other processes may have seen it and done something with it,
and unlinking it wouldn't simply undo the effects of the create.
Therefore, in the case where OPEN creates a new file, we shouldn't do
the create until we know that the rest of the OPEN processing will
succeed.
For example, we should preallocate a struct file in case we need it
until waiting to allocate it till process_open2(), which is already too
late.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r-- | fs/nfsd/xdr4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index 32e6fd8d9768..502dd43634f9 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -228,6 +228,7 @@ struct nfsd4_open { u32 op_rflags; /* response */ int op_truncate; /* used during processing */ struct nfs4_openowner *op_openowner; /* used during processing */ + struct nfs4_file *op_file; /* used during processing */ struct nfs4_acl *op_acl; }; #define op_iattr iattr |