Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192305
b: refs/heads/master
c: 987f8df
h: refs/heads/master
i:
  192303: f414701
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 14, 2010
1 parent daea577 commit 6bacd6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ab64e0e147e45c07e33d344401cf898a6c181c0
refs/heads/master: 987f8dfc9862f2c7b59594089793dedeebf0cf5e
14 changes: 10 additions & 4 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ int
nfs_setattr(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
struct nfs_fattr fattr;
int error;
struct nfs_fattr *fattr;
int error = -ENOMEM;

nfs_inc_stats(inode, NFSIOS_VFSSETATTR);

Expand All @@ -417,14 +417,20 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
filemap_write_and_wait(inode->i_mapping);
nfs_wb_all(inode);
}

fattr = nfs_alloc_fattr();
if (fattr == NULL)
goto out;
/*
* Return any delegations if we're going to change ACLs
*/
if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
nfs_inode_return_delegation(inode);
error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr);
error = NFS_PROTO(inode)->setattr(dentry, fattr, attr);
if (error == 0)
nfs_refresh_inode(inode, &fattr);
nfs_refresh_inode(inode, fattr);
nfs_free_fattr(fattr);
out:
return error;
}

Expand Down

0 comments on commit 6bacd6f

Please sign in to comment.