aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-31 12:58:16 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-26 02:46:06 -0500
commitbe308f07964a597ea1806a0c02477a383b92f53a (patch)
tree9dd3220096d6b399978fbe48267a20339778c4e0 /fs/9p/vfs_inode_dotl.c
parent0f235caeaed6bbde6d455e172a83fa693ca485a1 (diff)
9p: switch v9fs_acl_chmod() from dentry to inode+fid
caller has both, might as well pass them explicitly. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/vfs_inode_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 40895546e103..44485f353f19 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -567,10 +567,11 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
567 struct v9fs_session_info *v9ses; 567 struct v9fs_session_info *v9ses;
568 struct p9_fid *fid; 568 struct p9_fid *fid;
569 struct p9_iattr_dotl p9attr; 569 struct p9_iattr_dotl p9attr;
570 struct inode *inode = dentry->d_inode;
570 571
571 p9_debug(P9_DEBUG_VFS, "\n"); 572 p9_debug(P9_DEBUG_VFS, "\n");
572 573
573 retval = inode_change_ok(dentry->d_inode, iattr); 574 retval = inode_change_ok(inode, iattr);
574 if (retval) 575 if (retval)
575 return retval; 576 return retval;
576 577
@@ -591,23 +592,23 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
591 return PTR_ERR(fid); 592 return PTR_ERR(fid);
592 593
593 /* Write all dirty data */ 594 /* Write all dirty data */
594 if (S_ISREG(dentry->d_inode->i_mode)) 595 if (S_ISREG(inode->i_mode))
595 filemap_write_and_wait(dentry->d_inode->i_mapping); 596 filemap_write_and_wait(inode->i_mapping);
596 597
597 retval = p9_client_setattr(fid, &p9attr); 598 retval = p9_client_setattr(fid, &p9attr);
598 if (retval < 0) 599 if (retval < 0)
599 return retval; 600 return retval;
600 601
601 if ((iattr->ia_valid & ATTR_SIZE) && 602 if ((iattr->ia_valid & ATTR_SIZE) &&
602 iattr->ia_size != i_size_read(dentry->d_inode)) 603 iattr->ia_size != i_size_read(inode))
603 truncate_setsize(dentry->d_inode, iattr->ia_size); 604 truncate_setsize(inode, iattr->ia_size);
604 605
605 v9fs_invalidate_inode_attr(dentry->d_inode); 606 v9fs_invalidate_inode_attr(inode);
606 setattr_copy(dentry->d_inode, iattr); 607 setattr_copy(inode, iattr);
607 mark_inode_dirty(dentry->d_inode); 608 mark_inode_dirty(inode);
608 if (iattr->ia_valid & ATTR_MODE) { 609 if (iattr->ia_valid & ATTR_MODE) {
609 /* We also want to update ACL when we update mode bits */ 610 /* We also want to update ACL when we update mode bits */
610 retval = v9fs_acl_chmod(dentry); 611 retval = v9fs_acl_chmod(inode, fid);
611 if (retval < 0) 612 if (retval < 0)
612 return retval; 613 return retval;
613 } 614 }