aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 22:02:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 22:02:39 -0400
commitbbd9d6f7fbb0305c9a592bf05a32e87eb364a4ff (patch)
tree12b2bb4202b05f6ae6a43c6ce830a0472043dbe5 /fs/hfsplus
parent8e204874db000928e37199c2db82b7eb8966cc3c (diff)
parent5a9a43646cf709312d71eca71cef90ad802f28f9 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits) vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp isofs: Remove global fs lock jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory fix IN_DELETE_SELF on overwriting rename() on ramfs et.al. mm/truncate.c: fix build for CONFIG_BLOCK not enabled fs:update the NOTE of the file_operations structure Remove dead code in dget_parent() AFS: Fix silly characters in a comment switch d_add_ci() to d_splice_alias() in "found negative" case as well simplify gfs2_lookup() jfs_lookup(): don't bother with . or .. get rid of useless dget_parent() in btrfs rename() and link() get rid of useless dget_parent() in fs/btrfs/ioctl.c fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers drivers: fix up various ->llseek() implementations fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek Ext4: handle SEEK_HOLE/SEEK_DATA generically Btrfs: implement our own ->llseek fs: add SEEK_HOLE and SEEK_DATA flags reiserfs: make reiserfs default to barrier=flush ... Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new shrinker callout for the inode cache, that clashed with the xfs code to start the periodic workers later.
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/hfsplus_fs.h3
-rw-r--r--fs/hfsplus/inode.c16
2 files changed, 15 insertions, 4 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index 81dfd1e495e3..d7674d051f52 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -404,7 +404,8 @@ int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *);
404int hfsplus_cat_write_inode(struct inode *); 404int hfsplus_cat_write_inode(struct inode *);
405struct inode *hfsplus_new_inode(struct super_block *, int); 405struct inode *hfsplus_new_inode(struct super_block *, int);
406void hfsplus_delete_inode(struct inode *); 406void hfsplus_delete_inode(struct inode *);
407int hfsplus_file_fsync(struct file *file, int datasync); 407int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
408 int datasync);
408 409
409/* ioctl.c */ 410/* ioctl.c */
410long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); 411long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index 010cd363d085..4cc1e3a36ec7 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -119,8 +119,8 @@ static ssize_t hfsplus_direct_IO(int rw, struct kiocb *iocb,
119 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; 119 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host;
120 ssize_t ret; 120 ssize_t ret;
121 121
122 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 122 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
123 offset, nr_segs, hfsplus_get_block, NULL); 123 hfsplus_get_block);
124 124
125 /* 125 /*
126 * In case of error extending write may have instantiated a few 126 * In case of error extending write may have instantiated a few
@@ -298,6 +298,8 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
298 298
299 if ((attr->ia_valid & ATTR_SIZE) && 299 if ((attr->ia_valid & ATTR_SIZE) &&
300 attr->ia_size != i_size_read(inode)) { 300 attr->ia_size != i_size_read(inode)) {
301 inode_dio_wait(inode);
302
301 error = vmtruncate(inode, attr->ia_size); 303 error = vmtruncate(inode, attr->ia_size);
302 if (error) 304 if (error)
303 return error; 305 return error;
@@ -308,13 +310,19 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
308 return 0; 310 return 0;
309} 311}
310 312
311int hfsplus_file_fsync(struct file *file, int datasync) 313int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
314 int datasync)
312{ 315{
313 struct inode *inode = file->f_mapping->host; 316 struct inode *inode = file->f_mapping->host;
314 struct hfsplus_inode_info *hip = HFSPLUS_I(inode); 317 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
315 struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); 318 struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);
316 int error = 0, error2; 319 int error = 0, error2;
317 320
321 error = filemap_write_and_wait_range(inode->i_mapping, start, end);
322 if (error)
323 return error;
324 mutex_lock(&inode->i_mutex);
325
318 /* 326 /*
319 * Sync inode metadata into the catalog and extent trees. 327 * Sync inode metadata into the catalog and extent trees.
320 */ 328 */
@@ -342,6 +350,8 @@ int hfsplus_file_fsync(struct file *file, int datasync)
342 if (!test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags)) 350 if (!test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags))
343 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); 351 blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
344 352
353 mutex_unlock(&inode->i_mutex);
354
345 return error; 355 return error;
346} 356}
347 357