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>
This commit is contained in:
committed by
Boaz Harrosh
parent
cbe8260369
commit
8a1636c459
@@ -2361,6 +2361,9 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
|
||||
struct nfs4_state *state = NULL;
|
||||
int status;
|
||||
|
||||
if (pnfs_ld_layoutret_on_setattr(inode))
|
||||
pnfs_return_layout(inode);
|
||||
|
||||
nfs_fattr_init(fattr);
|
||||
|
||||
/* Search for an existing open(O_WRITE) file */
|
||||
|
||||
Reference in New Issue
Block a user