diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ff54014a24ec..3261d71319ee 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -370,7 +370,7 @@ static int ocfs2_cow_file_pos(struct inode *inode, | |||
370 | if (!(ext_flags & OCFS2_EXT_REFCOUNTED)) | 370 | if (!(ext_flags & OCFS2_EXT_REFCOUNTED)) |
371 | goto out; | 371 | goto out; |
372 | 372 | ||
373 | return ocfs2_refcount_cow(inode, NULL, fe_bh, cpos, 1, cpos+1); | 373 | return ocfs2_refcount_cow(inode, fe_bh, cpos, 1, cpos+1); |
374 | 374 | ||
375 | out: | 375 | out: |
376 | return status; | 376 | return status; |
@@ -899,7 +899,7 @@ static int ocfs2_zero_extend_get_range(struct inode *inode, | |||
899 | zero_clusters = last_cpos - zero_cpos; | 899 | zero_clusters = last_cpos - zero_cpos; |
900 | 900 | ||
901 | if (needs_cow) { | 901 | if (needs_cow) { |
902 | rc = ocfs2_refcount_cow(inode, NULL, di_bh, zero_cpos, | 902 | rc = ocfs2_refcount_cow(inode, di_bh, zero_cpos, |
903 | zero_clusters, UINT_MAX); | 903 | zero_clusters, UINT_MAX); |
904 | if (rc) { | 904 | if (rc) { |
905 | mlog_errno(rc); | 905 | mlog_errno(rc); |
@@ -2078,7 +2078,7 @@ static int ocfs2_prepare_inode_for_refcount(struct inode *inode, | |||
2078 | 2078 | ||
2079 | *meta_level = 1; | 2079 | *meta_level = 1; |
2080 | 2080 | ||
2081 | ret = ocfs2_refcount_cow(inode, file, di_bh, cpos, clusters, UINT_MAX); | 2081 | ret = ocfs2_refcount_cow(inode, di_bh, cpos, clusters, UINT_MAX); |
2082 | if (ret) | 2082 | if (ret) |
2083 | mlog_errno(ret); | 2083 | mlog_errno(ret); |
2084 | out: | 2084 | out: |
@@ -2646,17 +2646,7 @@ static loff_t ocfs2_file_llseek(struct file *file, loff_t offset, int whence) | |||
2646 | goto out; | 2646 | goto out; |
2647 | } | 2647 | } |
2648 | 2648 | ||
2649 | if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) | 2649 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); |
2650 | ret = -EINVAL; | ||
2651 | if (!ret && offset > inode->i_sb->s_maxbytes) | ||
2652 | ret = -EINVAL; | ||
2653 | if (ret) | ||
2654 | goto out; | ||
2655 | |||
2656 | if (offset != file->f_pos) { | ||
2657 | file->f_pos = offset; | ||
2658 | file->f_version = 0; | ||
2659 | } | ||
2660 | 2650 | ||
2661 | out: | 2651 | out: |
2662 | mutex_unlock(&inode->i_mutex); | 2652 | mutex_unlock(&inode->i_mutex); |
@@ -2712,7 +2702,7 @@ const struct file_operations ocfs2_fops = { | |||
2712 | const struct file_operations ocfs2_dops = { | 2702 | const struct file_operations ocfs2_dops = { |
2713 | .llseek = generic_file_llseek, | 2703 | .llseek = generic_file_llseek, |
2714 | .read = generic_read_dir, | 2704 | .read = generic_read_dir, |
2715 | .readdir = ocfs2_readdir, | 2705 | .iterate = ocfs2_readdir, |
2716 | .fsync = ocfs2_sync_file, | 2706 | .fsync = ocfs2_sync_file, |
2717 | .release = ocfs2_dir_release, | 2707 | .release = ocfs2_dir_release, |
2718 | .open = ocfs2_dir_open, | 2708 | .open = ocfs2_dir_open, |
@@ -2759,7 +2749,7 @@ const struct file_operations ocfs2_fops_no_plocks = { | |||
2759 | const struct file_operations ocfs2_dops_no_plocks = { | 2749 | const struct file_operations ocfs2_dops_no_plocks = { |
2760 | .llseek = generic_file_llseek, | 2750 | .llseek = generic_file_llseek, |
2761 | .read = generic_read_dir, | 2751 | .read = generic_read_dir, |
2762 | .readdir = ocfs2_readdir, | 2752 | .iterate = ocfs2_readdir, |
2763 | .fsync = ocfs2_sync_file, | 2753 | .fsync = ocfs2_sync_file, |
2764 | .release = ocfs2_dir_release, | 2754 | .release = ocfs2_dir_release, |
2765 | .open = ocfs2_dir_open, | 2755 | .open = ocfs2_dir_open, |