Skip to content

Commit

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

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Dmitry Monakhov authored and Jan Kara committed Apr 8, 2010
1 parent 69ecbbe commit c15d0fc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/udf/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const struct file_operations udf_file_operations = {
.llseek = generic_file_llseek,
};

static int udf_setattr(struct dentry *dentry, struct iattr *iattr)
int udf_setattr(struct dentry *dentry, struct iattr *iattr)
{
struct inode *inode = dentry->d_inode;
int error;
Expand Down
2 changes: 1 addition & 1 deletion fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
break;
case ICBTAG_FILE_TYPE_SYMLINK:
inode->i_data.a_ops = &udf_symlink_aops;
inode->i_op = &page_symlink_inode_operations;
inode->i_op = &udf_symlink_inode_operations;
inode->i_mode = S_IFLNK | S_IRWXUGO;
break;
case ICBTAG_FILE_TYPE_MAIN:
Expand Down
9 changes: 8 additions & 1 deletion fs/udf/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
iinfo = UDF_I(inode);
inode->i_mode = S_IFLNK | S_IRWXUGO;
inode->i_data.a_ops = &udf_symlink_aops;
inode->i_op = &page_symlink_inode_operations;
inode->i_op = &udf_symlink_inode_operations;

if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
struct kernel_lb_addr eloc;
Expand Down Expand Up @@ -1393,6 +1393,7 @@ const struct export_operations udf_export_ops = {
const struct inode_operations udf_dir_inode_operations = {
.lookup = udf_lookup,
.create = udf_create,
.setattr = udf_setattr,
.link = udf_link,
.unlink = udf_unlink,
.symlink = udf_symlink,
Expand All @@ -1401,3 +1402,9 @@ const struct inode_operations udf_dir_inode_operations = {
.mknod = udf_mknod,
.rename = udf_rename,
};
const struct inode_operations udf_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
.setattr = udf_setattr,
};
3 changes: 2 additions & 1 deletion fs/udf/udfdecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extern const struct inode_operations udf_dir_inode_operations;
extern const struct file_operations udf_dir_operations;
extern const struct inode_operations udf_file_inode_operations;
extern const struct file_operations udf_file_operations;
extern const struct inode_operations udf_symlink_inode_operations;
extern const struct address_space_operations udf_aops;
extern const struct address_space_operations udf_adinicb_aops;
extern const struct address_space_operations udf_symlink_aops;
Expand Down Expand Up @@ -131,7 +132,7 @@ extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *,
/* file.c */
extern int udf_ioctl(struct inode *, struct file *, unsigned int,
unsigned long);

extern int udf_setattr(struct dentry *dentry, struct iattr *iattr);
/* inode.c */
extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr *);
extern int udf_sync_inode(struct inode *);
Expand Down

0 comments on commit c15d0fc

Please sign in to comment.