Skip to content

Commit

Permalink
ufs: add ufs speciffic ->setattr call
Browse files Browse the repository at this point in the history
generic setattr not longer responsible for quota transfer.
use ufs_setattr for all ufs's inodes.

Signed-off-by: Dmitry Monakhov <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
Dmitry Monakhov authored and jankara committed May 21, 2010
1 parent e0a5cba commit 311b954
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/ufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static void ufs_set_inode_ops(struct inode *inode)
if (!inode->i_blocks)
inode->i_op = &ufs_fast_symlink_inode_operations;
else {
inode->i_op = &page_symlink_inode_operations;
inode->i_op = &ufs_symlink_inode_operations;
inode->i_mapping->a_ops = &ufs_aops;
}
} else
Expand Down
2 changes: 1 addition & 1 deletion fs/ufs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,

if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) {
/* slow symlink */
inode->i_op = &page_symlink_inode_operations;
inode->i_op = &ufs_symlink_inode_operations;
inode->i_mapping->a_ops = &ufs_aops;
err = page_symlink(inode, symname, l);
if (err)
Expand Down
8 changes: 8 additions & 0 deletions fs/ufs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,12 @@ static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
const struct inode_operations ufs_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = ufs_follow_link,
.setattr = ufs_setattr,
};

const struct inode_operations ufs_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
.setattr = ufs_setattr,
};
2 changes: 1 addition & 1 deletion fs/ufs/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size)
* - there is no way to know old size
* - there is no way inform user about error, if it happens in `truncate'
*/
static int ufs_setattr(struct dentry *dentry, struct iattr *attr)
int ufs_setattr(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
unsigned int ia_valid = attr->ia_valid;
Expand Down
2 changes: 2 additions & 0 deletions fs/ufs/ufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __

/* symlink.c */
extern const struct inode_operations ufs_fast_symlink_inode_operations;
extern const struct inode_operations ufs_symlink_inode_operations;

/* truncate.c */
extern int ufs_truncate (struct inode *, loff_t);
extern int ufs_setattr(struct dentry *dentry, struct iattr *attr);

static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
{
Expand Down

0 comments on commit 311b954

Please sign in to comment.