diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/export.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/inode.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 1 |
7 files changed, 11 insertions, 15 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index a6cc05302e9f..b108e863d8f6 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -1729,7 +1729,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg, | |||
1729 | goto out; | 1729 | goto out; |
1730 | 1730 | ||
1731 | reg->hr_bdev = I_BDEV(filp->f_mapping->host); | 1731 | reg->hr_bdev = I_BDEV(filp->f_mapping->host); |
1732 | ret = blkdev_get(reg->hr_bdev, FMODE_WRITE | FMODE_READ); | 1732 | ret = blkdev_get(reg->hr_bdev, FMODE_WRITE | FMODE_READ, NULL); |
1733 | if (ret) { | 1733 | if (ret) { |
1734 | reg->hr_bdev = NULL; | 1734 | reg->hr_bdev = NULL; |
1735 | goto out; | 1735 | goto out; |
diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 6adafa576065..5dbc3062b4fd 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c | |||
@@ -137,9 +137,7 @@ check_gen: | |||
137 | } | 137 | } |
138 | 138 | ||
139 | result = d_obtain_alias(inode); | 139 | result = d_obtain_alias(inode); |
140 | if (!IS_ERR(result)) | 140 | if (IS_ERR(result)) |
141 | d_set_d_op(result, &ocfs2_dentry_ops); | ||
142 | else | ||
143 | mlog_errno(PTR_ERR(result)); | 141 | mlog_errno(PTR_ERR(result)); |
144 | 142 | ||
145 | bail: | 143 | bail: |
@@ -175,8 +173,6 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) | |||
175 | } | 173 | } |
176 | 174 | ||
177 | parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); | 175 | parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); |
178 | if (!IS_ERR(parent)) | ||
179 | d_set_d_op(parent, &ocfs2_dentry_ops); | ||
180 | 176 | ||
181 | bail_unlock: | 177 | bail_unlock: |
182 | ocfs2_inode_unlock(dir, 0); | 178 | ocfs2_inode_unlock(dir, 0); |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index bdadbae09094..63e3fca266e0 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1995,6 +1995,7 @@ static long ocfs2_fallocate(struct inode *inode, int mode, loff_t offset, | |||
1995 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1995 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
1996 | struct ocfs2_space_resv sr; | 1996 | struct ocfs2_space_resv sr; |
1997 | int change_size = 1; | 1997 | int change_size = 1; |
1998 | int cmd = OCFS2_IOC_RESVSP64; | ||
1998 | 1999 | ||
1999 | if (!ocfs2_writes_unwritten_extents(osb)) | 2000 | if (!ocfs2_writes_unwritten_extents(osb)) |
2000 | return -EOPNOTSUPP; | 2001 | return -EOPNOTSUPP; |
@@ -2005,12 +2006,15 @@ static long ocfs2_fallocate(struct inode *inode, int mode, loff_t offset, | |||
2005 | if (mode & FALLOC_FL_KEEP_SIZE) | 2006 | if (mode & FALLOC_FL_KEEP_SIZE) |
2006 | change_size = 0; | 2007 | change_size = 0; |
2007 | 2008 | ||
2009 | if (mode & FALLOC_FL_PUNCH_HOLE) | ||
2010 | cmd = OCFS2_IOC_UNRESVSP64; | ||
2011 | |||
2008 | sr.l_whence = 0; | 2012 | sr.l_whence = 0; |
2009 | sr.l_start = (s64)offset; | 2013 | sr.l_start = (s64)offset; |
2010 | sr.l_len = (s64)len; | 2014 | sr.l_len = (s64)len; |
2011 | 2015 | ||
2012 | return __ocfs2_change_file_space(NULL, inode, offset, | 2016 | return __ocfs2_change_file_space(NULL, inode, offset, cmd, &sr, |
2013 | OCFS2_IOC_RESVSP64, &sr, change_size); | 2017 | change_size); |
2014 | } | 2018 | } |
2015 | 2019 | ||
2016 | int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, | 2020 | int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index f935fd6600dd..4068c6c4c6f6 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -434,7 +434,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
434 | * #1 and #2 can be simply solved by never taking the lock | 434 | * #1 and #2 can be simply solved by never taking the lock |
435 | * here for system files (which are the only type we read | 435 | * here for system files (which are the only type we read |
436 | * during mount). It's a heavier approach, but our main | 436 | * during mount). It's a heavier approach, but our main |
437 | * concern is user-accesible files anyway. | 437 | * concern is user-accessible files anyway. |
438 | * | 438 | * |
439 | * #3 works itself out because we'll eventually take the | 439 | * #3 works itself out because we'll eventually take the |
440 | * cluster lock before trusting anything anyway. | 440 | * cluster lock before trusting anything anyway. |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 30c523144452..849fb4a2e814 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -147,7 +147,6 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
147 | spin_unlock(&oi->ip_lock); | 147 | spin_unlock(&oi->ip_lock); |
148 | 148 | ||
149 | bail_add: | 149 | bail_add: |
150 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
151 | ret = d_splice_alias(inode, dentry); | 150 | ret = d_splice_alias(inode, dentry); |
152 | 151 | ||
153 | if (inode) { | 152 | if (inode) { |
@@ -415,7 +414,6 @@ static int ocfs2_mknod(struct inode *dir, | |||
415 | mlog_errno(status); | 414 | mlog_errno(status); |
416 | goto leave; | 415 | goto leave; |
417 | } | 416 | } |
418 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
419 | 417 | ||
420 | status = ocfs2_add_entry(handle, dentry, inode, | 418 | status = ocfs2_add_entry(handle, dentry, inode, |
421 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, | 419 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, |
@@ -743,7 +741,6 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
743 | } | 741 | } |
744 | 742 | ||
745 | ihold(inode); | 743 | ihold(inode); |
746 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
747 | d_instantiate(dentry, inode); | 744 | d_instantiate(dentry, inode); |
748 | 745 | ||
749 | out_commit: | 746 | out_commit: |
@@ -1797,7 +1794,6 @@ static int ocfs2_symlink(struct inode *dir, | |||
1797 | mlog_errno(status); | 1794 | mlog_errno(status); |
1798 | goto bail; | 1795 | goto bail; |
1799 | } | 1796 | } |
1800 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
1801 | 1797 | ||
1802 | status = ocfs2_add_entry(handle, dentry, inode, | 1798 | status = ocfs2_add_entry(handle, dentry, inode, |
1803 | le64_to_cpu(fe->i_blkno), parent_fe_bh, | 1799 | le64_to_cpu(fe->i_blkno), parent_fe_bh, |
@@ -2462,7 +2458,6 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir, | |||
2462 | goto out_commit; | 2458 | goto out_commit; |
2463 | } | 2459 | } |
2464 | 2460 | ||
2465 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
2466 | d_instantiate(dentry, inode); | 2461 | d_instantiate(dentry, inode); |
2467 | status = 0; | 2462 | status = 0; |
2468 | out_commit: | 2463 | out_commit: |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 5fed60de7630..71998d4d61d5 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -1916,7 +1916,7 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, | |||
1916 | if (res->sr_bg_blkno) { | 1916 | if (res->sr_bg_blkno) { |
1917 | /* Attempt to short-circuit the usual search mechanism | 1917 | /* Attempt to short-circuit the usual search mechanism |
1918 | * by jumping straight to the most recently used | 1918 | * by jumping straight to the most recently used |
1919 | * allocation group. This helps us mantain some | 1919 | * allocation group. This helps us maintain some |
1920 | * contiguousness across allocations. */ | 1920 | * contiguousness across allocations. */ |
1921 | status = ocfs2_search_one_group(ac, handle, bits_wanted, | 1921 | status = ocfs2_search_one_group(ac, handle, bits_wanted, |
1922 | min_bits, res, &bits_left); | 1922 | min_bits, res, &bits_left); |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 17ff46fa8a10..06d1f749ca89 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -2097,6 +2097,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2097 | 2097 | ||
2098 | sb->s_fs_info = osb; | 2098 | sb->s_fs_info = osb; |
2099 | sb->s_op = &ocfs2_sops; | 2099 | sb->s_op = &ocfs2_sops; |
2100 | sb->s_d_op = &ocfs2_dentry_ops; | ||
2100 | sb->s_export_op = &ocfs2_export_ops; | 2101 | sb->s_export_op = &ocfs2_export_ops; |
2101 | sb->s_qcop = &ocfs2_quotactl_ops; | 2102 | sb->s_qcop = &ocfs2_quotactl_ops; |
2102 | sb->dq_op = &ocfs2_quota_operations; | 2103 | sb->dq_op = &ocfs2_quota_operations; |