diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2010-04-14 18:56:58 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-05-21 13:30:40 -0400 |
commit | 311b9549ed2bb0f2c2257781c3e88cb00505e80e (patch) | |
tree | 2a6769c682ae570103f581f03e43fee98261d177 /fs | |
parent | e0a5cbac029db69032758000c67465c2ed7a5736 (diff) |
ufs: add ufs speciffic ->setattr call
generic setattr not longer responsible for quota transfer.
use ufs_setattr for all ufs's inodes.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ufs/inode.c | 2 | ||||
-rw-r--r-- | fs/ufs/namei.c | 2 | ||||
-rw-r--r-- | fs/ufs/symlink.c | 8 | ||||
-rw-r--r-- | fs/ufs/truncate.c | 2 | ||||
-rw-r--r-- | fs/ufs/ufs.h | 2 |
5 files changed, 13 insertions, 3 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 80b68c3702d1..cffa756f1047 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -603,7 +603,7 @@ static void ufs_set_inode_ops(struct inode *inode) | |||
603 | if (!inode->i_blocks) | 603 | if (!inode->i_blocks) |
604 | inode->i_op = &ufs_fast_symlink_inode_operations; | 604 | inode->i_op = &ufs_fast_symlink_inode_operations; |
605 | else { | 605 | else { |
606 | inode->i_op = &page_symlink_inode_operations; | 606 | inode->i_op = &ufs_symlink_inode_operations; |
607 | inode->i_mapping->a_ops = &ufs_aops; | 607 | inode->i_mapping->a_ops = &ufs_aops; |
608 | } | 608 | } |
609 | } else | 609 | } else |
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 118556243e7a..eabc02eb1294 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c | |||
@@ -148,7 +148,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, | |||
148 | 148 | ||
149 | if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) { | 149 | if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) { |
150 | /* slow symlink */ | 150 | /* slow symlink */ |
151 | inode->i_op = &page_symlink_inode_operations; | 151 | inode->i_op = &ufs_symlink_inode_operations; |
152 | inode->i_mapping->a_ops = &ufs_aops; | 152 | inode->i_mapping->a_ops = &ufs_aops; |
153 | err = page_symlink(inode, symname, l); | 153 | err = page_symlink(inode, symname, l); |
154 | if (err) | 154 | if (err) |
diff --git a/fs/ufs/symlink.c b/fs/ufs/symlink.c index c0156eda44bc..d283628b4778 100644 --- a/fs/ufs/symlink.c +++ b/fs/ufs/symlink.c | |||
@@ -42,4 +42,12 @@ static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
42 | const struct inode_operations ufs_fast_symlink_inode_operations = { | 42 | const struct inode_operations ufs_fast_symlink_inode_operations = { |
43 | .readlink = generic_readlink, | 43 | .readlink = generic_readlink, |
44 | .follow_link = ufs_follow_link, | 44 | .follow_link = ufs_follow_link, |
45 | .setattr = ufs_setattr, | ||
46 | }; | ||
47 | |||
48 | const struct inode_operations ufs_symlink_inode_operations = { | ||
49 | .readlink = generic_readlink, | ||
50 | .follow_link = page_follow_link_light, | ||
51 | .put_link = page_put_link, | ||
52 | .setattr = ufs_setattr, | ||
45 | }; | 53 | }; |
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index d3b6270cb377..ee8db3e77bfe 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
@@ -508,7 +508,7 @@ out: | |||
508 | * - there is no way to know old size | 508 | * - there is no way to know old size |
509 | * - there is no way inform user about error, if it happens in `truncate' | 509 | * - there is no way inform user about error, if it happens in `truncate' |
510 | */ | 510 | */ |
511 | static int ufs_setattr(struct dentry *dentry, struct iattr *attr) | 511 | int ufs_setattr(struct dentry *dentry, struct iattr *attr) |
512 | { | 512 | { |
513 | struct inode *inode = dentry->d_inode; | 513 | struct inode *inode = dentry->d_inode; |
514 | unsigned int ia_valid = attr->ia_valid; | 514 | unsigned int ia_valid = attr->ia_valid; |
diff --git a/fs/ufs/ufs.h b/fs/ufs/ufs.h index 43f9f5d5670e..179ae6b3180a 100644 --- a/fs/ufs/ufs.h +++ b/fs/ufs/ufs.h | |||
@@ -122,9 +122,11 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __ | |||
122 | 122 | ||
123 | /* symlink.c */ | 123 | /* symlink.c */ |
124 | extern const struct inode_operations ufs_fast_symlink_inode_operations; | 124 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
125 | extern const struct inode_operations ufs_symlink_inode_operations; | ||
125 | 126 | ||
126 | /* truncate.c */ | 127 | /* truncate.c */ |
127 | extern int ufs_truncate (struct inode *, loff_t); | 128 | extern int ufs_truncate (struct inode *, loff_t); |
129 | extern int ufs_setattr(struct dentry *dentry, struct iattr *attr); | ||
128 | 130 | ||
129 | static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) | 131 | static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) |
130 | { | 132 | { |