diff options
author | Benny Halevy <bhalevy@panasas.com> | 2010-07-14 15:43:57 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-05-29 13:54:36 -0400 |
commit | 8a1636c459cb7a4b32ba4024cd1b2ba21fba6aed (patch) | |
tree | f9c46f272b98ceb65f997f226d47da68c6fcac6b /fs/nfs/nfs4proc.c | |
parent | cbe8260369c9f88eafa035cd327dc3e02fad528c (diff) |
pnfs: layoutret_on_setattr
With the objects layout security model, we have object capabilities
that are associated with the layout and we anticipate that the server
will issue a cb_layoutrecall for any setattr that changes security
related attributes (user/group/mode/acl) or truncates the file.
Therefore, the layout is returned before issuing the setattr to avoid
the anticipated cb_layoutrecall.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5b4124e4c22f..57340096c737 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2361,6 +2361,9 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
2361 | struct nfs4_state *state = NULL; | 2361 | struct nfs4_state *state = NULL; |
2362 | int status; | 2362 | int status; |
2363 | 2363 | ||
2364 | if (pnfs_ld_layoutret_on_setattr(inode)) | ||
2365 | pnfs_return_layout(inode); | ||
2366 | |||
2364 | nfs_fattr_init(fattr); | 2367 | nfs_fattr_init(fattr); |
2365 | 2368 | ||
2366 | /* Search for an existing open(O_WRITE) file */ | 2369 | /* Search for an existing open(O_WRITE) file */ |