diff options
| -rw-r--r-- | fs/ocfs2/alloc.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/aops.c | 18 | ||||
| -rw-r--r-- | fs/ocfs2/dir.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/dlmglue.c | 50 | ||||
| -rw-r--r-- | fs/ocfs2/dlmglue.h | 12 | ||||
| -rw-r--r-- | fs/ocfs2/export.c | 4 | ||||
| -rw-r--r-- | fs/ocfs2/file.c | 42 | ||||
| -rw-r--r-- | fs/ocfs2/inode.c | 30 | ||||
| -rw-r--r-- | fs/ocfs2/inode.h | 2 | ||||
| -rw-r--r-- | fs/ocfs2/ioctl.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/journal.c | 26 | ||||
| -rw-r--r-- | fs/ocfs2/localalloc.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/mmap.c | 8 | ||||
| -rw-r--r-- | fs/ocfs2/namei.c | 54 | ||||
| -rw-r--r-- | fs/ocfs2/suballoc.c | 4 | ||||
| -rw-r--r-- | fs/ocfs2/super.c | 6 |
16 files changed, 144 insertions, 144 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 23c8cda43f19..e6df06ac6405 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
| @@ -4731,7 +4731,7 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) | |||
| 4731 | 4731 | ||
| 4732 | mutex_lock(&data_alloc_inode->i_mutex); | 4732 | mutex_lock(&data_alloc_inode->i_mutex); |
| 4733 | 4733 | ||
| 4734 | status = ocfs2_meta_lock(data_alloc_inode, &data_alloc_bh, 1); | 4734 | status = ocfs2_inode_lock(data_alloc_inode, &data_alloc_bh, 1); |
| 4735 | if (status < 0) { | 4735 | if (status < 0) { |
| 4736 | mlog_errno(status); | 4736 | mlog_errno(status); |
| 4737 | goto out_mutex; | 4737 | goto out_mutex; |
| @@ -4753,7 +4753,7 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) | |||
| 4753 | 4753 | ||
| 4754 | out_unlock: | 4754 | out_unlock: |
| 4755 | brelse(data_alloc_bh); | 4755 | brelse(data_alloc_bh); |
| 4756 | ocfs2_meta_unlock(data_alloc_inode, 1); | 4756 | ocfs2_inode_unlock(data_alloc_inode, 1); |
| 4757 | 4757 | ||
| 4758 | out_mutex: | 4758 | out_mutex: |
| 4759 | mutex_unlock(&data_alloc_inode->i_mutex); | 4759 | mutex_unlock(&data_alloc_inode->i_mutex); |
| @@ -5077,7 +5077,7 @@ static int ocfs2_free_cached_items(struct ocfs2_super *osb, | |||
| 5077 | 5077 | ||
| 5078 | mutex_lock(&inode->i_mutex); | 5078 | mutex_lock(&inode->i_mutex); |
| 5079 | 5079 | ||
| 5080 | ret = ocfs2_meta_lock(inode, &di_bh, 1); | 5080 | ret = ocfs2_inode_lock(inode, &di_bh, 1); |
| 5081 | if (ret) { | 5081 | if (ret) { |
| 5082 | mlog_errno(ret); | 5082 | mlog_errno(ret); |
| 5083 | goto out_mutex; | 5083 | goto out_mutex; |
| @@ -5118,7 +5118,7 @@ out_journal: | |||
| 5118 | ocfs2_commit_trans(osb, handle); | 5118 | ocfs2_commit_trans(osb, handle); |
| 5119 | 5119 | ||
| 5120 | out_unlock: | 5120 | out_unlock: |
| 5121 | ocfs2_meta_unlock(inode, 1); | 5121 | ocfs2_inode_unlock(inode, 1); |
| 5122 | brelse(di_bh); | 5122 | brelse(di_bh); |
| 5123 | out_mutex: | 5123 | out_mutex: |
| 5124 | mutex_unlock(&inode->i_mutex); | 5124 | mutex_unlock(&inode->i_mutex); |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 5fc27cfaee50..ac8c39055717 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
| @@ -275,7 +275,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) | |||
| 275 | 275 | ||
| 276 | mlog_entry("(0x%p, %lu)\n", file, (page ? page->index : 0)); | 276 | mlog_entry("(0x%p, %lu)\n", file, (page ? page->index : 0)); |
| 277 | 277 | ||
| 278 | ret = ocfs2_meta_lock_with_page(inode, NULL, 0, page); | 278 | ret = ocfs2_inode_lock_with_page(inode, NULL, 0, page); |
| 279 | if (ret != 0) { | 279 | if (ret != 0) { |
| 280 | if (ret == AOP_TRUNCATED_PAGE) | 280 | if (ret == AOP_TRUNCATED_PAGE) |
| 281 | unlock = 0; | 281 | unlock = 0; |
| @@ -285,7 +285,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) | |||
| 285 | 285 | ||
| 286 | if (down_read_trylock(&oi->ip_alloc_sem) == 0) { | 286 | if (down_read_trylock(&oi->ip_alloc_sem) == 0) { |
| 287 | ret = AOP_TRUNCATED_PAGE; | 287 | ret = AOP_TRUNCATED_PAGE; |
| 288 | goto out_meta_unlock; | 288 | goto out_inode_unlock; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | /* | 291 | /* |
| @@ -313,8 +313,8 @@ static int ocfs2_readpage(struct file *file, struct page *page) | |||
| 313 | 313 | ||
| 314 | out_alloc: | 314 | out_alloc: |
| 315 | up_read(&OCFS2_I(inode)->ip_alloc_sem); | 315 | up_read(&OCFS2_I(inode)->ip_alloc_sem); |
| 316 | out_meta_unlock: | 316 | out_inode_unlock: |
| 317 | ocfs2_meta_unlock(inode, 0); | 317 | ocfs2_inode_unlock(inode, 0); |
| 318 | out: | 318 | out: |
| 319 | if (unlock) | 319 | if (unlock) |
| 320 | unlock_page(page); | 320 | unlock_page(page); |
| @@ -443,7 +443,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) | |||
| 443 | * accessed concurrently from multiple nodes. | 443 | * accessed concurrently from multiple nodes. |
| 444 | */ | 444 | */ |
| 445 | if (!INODE_JOURNAL(inode)) { | 445 | if (!INODE_JOURNAL(inode)) { |
| 446 | err = ocfs2_meta_lock(inode, NULL, 0); | 446 | err = ocfs2_inode_lock(inode, NULL, 0); |
| 447 | if (err) { | 447 | if (err) { |
| 448 | if (err != -ENOENT) | 448 | if (err != -ENOENT) |
| 449 | mlog_errno(err); | 449 | mlog_errno(err); |
| @@ -458,7 +458,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) | |||
| 458 | 458 | ||
| 459 | if (!INODE_JOURNAL(inode)) { | 459 | if (!INODE_JOURNAL(inode)) { |
| 460 | up_read(&OCFS2_I(inode)->ip_alloc_sem); | 460 | up_read(&OCFS2_I(inode)->ip_alloc_sem); |
| 461 | ocfs2_meta_unlock(inode, 0); | 461 | ocfs2_inode_unlock(inode, 0); |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | if (err) { | 464 | if (err) { |
| @@ -1723,7 +1723,7 @@ static int ocfs2_write_begin(struct file *file, struct address_space *mapping, | |||
| 1723 | struct buffer_head *di_bh = NULL; | 1723 | struct buffer_head *di_bh = NULL; |
| 1724 | struct inode *inode = mapping->host; | 1724 | struct inode *inode = mapping->host; |
| 1725 | 1725 | ||
| 1726 | ret = ocfs2_meta_lock(inode, &di_bh, 1); | 1726 | ret = ocfs2_inode_lock(inode, &di_bh, 1); |
| 1727 | if (ret) { | 1727 | if (ret) { |
| 1728 | mlog_errno(ret); | 1728 | mlog_errno(ret); |
| 1729 | return ret; | 1729 | return ret; |
| @@ -1753,7 +1753,7 @@ out_fail: | |||
| 1753 | up_write(&OCFS2_I(inode)->ip_alloc_sem); | 1753 | up_write(&OCFS2_I(inode)->ip_alloc_sem); |
| 1754 | 1754 | ||
| 1755 | brelse(di_bh); | 1755 | brelse(di_bh); |
| 1756 | ocfs2_meta_unlock(inode, 1); | 1756 | ocfs2_inode_unlock(inode, 1); |
| 1757 | 1757 | ||
| 1758 | return ret; | 1758 | return ret; |
| 1759 | } | 1759 | } |
| @@ -1870,7 +1870,7 @@ static int ocfs2_write_end(struct file *file, struct address_space *mapping, | |||
| 1870 | ret = ocfs2_write_end_nolock(mapping, pos, len, copied, page, fsdata); | 1870 | ret = ocfs2_write_end_nolock(mapping, pos, len, copied, page, fsdata); |
| 1871 | 1871 | ||
| 1872 | up_write(&OCFS2_I(inode)->ip_alloc_sem); | 1872 | up_write(&OCFS2_I(inode)->ip_alloc_sem); |
| 1873 | ocfs2_meta_unlock(inode, 1); | 1873 | ocfs2_inode_unlock(inode, 1); |
| 1874 | 1874 | ||
| 1875 | return ret; | 1875 | return ret; |
| 1876 | } | 1876 | } |
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 63b28fdceb4a..6b0107f21344 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
| @@ -846,14 +846,14 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
| 846 | mlog_entry("dirino=%llu\n", | 846 | mlog_entry("dirino=%llu\n", |
| 847 | (unsigned long long)OCFS2_I(inode)->ip_blkno); | 847 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
| 848 | 848 | ||
| 849 | error = ocfs2_meta_lock_atime(inode, filp->f_vfsmnt, &lock_level); | 849 | error = ocfs2_inode_lock_atime(inode, filp->f_vfsmnt, &lock_level); |
| 850 | if (lock_level && error >= 0) { | 850 | if (lock_level && error >= 0) { |
| 851 | /* We release EX lock which used to update atime | 851 | /* We release EX lock which used to update atime |
| 852 | * and get PR lock again to reduce contention | 852 | * and get PR lock again to reduce contention |
| 853 | * on commonly accessed directories. */ | 853 | * on commonly accessed directories. */ |
| 854 | ocfs2_meta_unlock(inode, 1); | 854 | ocfs2_inode_unlock(inode, 1); |
| 855 | lock_level = 0; | 855 | lock_level = 0; |
| 856 | error = ocfs2_meta_lock(inode, NULL, 0); | 856 | error = ocfs2_inode_lock(inode, NULL, 0); |
| 857 | } | 857 | } |
| 858 | if (error < 0) { | 858 | if (error < 0) { |
| 859 | if (error != -ENOENT) | 859 | if (error != -ENOENT) |
| @@ -865,7 +865,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
| 865 | error = ocfs2_dir_foreach_blk(inode, &filp->f_version, &filp->f_pos, | 865 | error = ocfs2_dir_foreach_blk(inode, &filp->f_version, &filp->f_pos, |
| 866 | dirent, filldir, NULL); | 866 | dirent, filldir, NULL); |
| 867 | 867 | ||
| 868 | ocfs2_meta_unlock(inode, lock_level); | 868 | ocfs2_inode_unlock(inode, lock_level); |
| 869 | 869 | ||
| 870 | bail_nolock: | 870 | bail_nolock: |
| 871 | mlog_exit(error); | 871 | mlog_exit(error); |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index ecf58c6e2fa3..fa5e3bdc295d 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
| @@ -224,7 +224,7 @@ static struct ocfs2_lock_res_ops ocfs2_inode_rw_lops = { | |||
| 224 | .flags = 0, | 224 | .flags = 0, |
| 225 | }; | 225 | }; |
| 226 | 226 | ||
| 227 | static struct ocfs2_lock_res_ops ocfs2_inode_meta_lops = { | 227 | static struct ocfs2_lock_res_ops ocfs2_inode_inode_lops = { |
| 228 | .get_osb = ocfs2_get_inode_osb, | 228 | .get_osb = ocfs2_get_inode_osb, |
| 229 | .check_downconvert = ocfs2_check_meta_downconvert, | 229 | .check_downconvert = ocfs2_check_meta_downconvert, |
| 230 | .set_lvb = ocfs2_set_meta_lvb, | 230 | .set_lvb = ocfs2_set_meta_lvb, |
| @@ -306,7 +306,7 @@ static inline void ocfs2_recover_from_dlm_error(struct ocfs2_lock_res *lockres, | |||
| 306 | static int ocfs2_downconvert_thread(void *arg); | 306 | static int ocfs2_downconvert_thread(void *arg); |
| 307 | static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, | 307 | static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, |
| 308 | struct ocfs2_lock_res *lockres); | 308 | struct ocfs2_lock_res *lockres); |
| 309 | static int ocfs2_meta_lock_update(struct inode *inode, | 309 | static int ocfs2_inode_lock_update(struct inode *inode, |
| 310 | struct buffer_head **bh); | 310 | struct buffer_head **bh); |
| 311 | static void ocfs2_drop_osb_locks(struct ocfs2_super *osb); | 311 | static void ocfs2_drop_osb_locks(struct ocfs2_super *osb); |
| 312 | static inline int ocfs2_highest_compat_lock_level(int level); | 312 | static inline int ocfs2_highest_compat_lock_level(int level); |
| @@ -396,7 +396,7 @@ void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res, | |||
| 396 | ops = &ocfs2_inode_rw_lops; | 396 | ops = &ocfs2_inode_rw_lops; |
| 397 | break; | 397 | break; |
| 398 | case OCFS2_LOCK_TYPE_META: | 398 | case OCFS2_LOCK_TYPE_META: |
| 399 | ops = &ocfs2_inode_meta_lops; | 399 | ops = &ocfs2_inode_inode_lops; |
| 400 | break; | 400 | break; |
| 401 | case OCFS2_LOCK_TYPE_OPEN: | 401 | case OCFS2_LOCK_TYPE_OPEN: |
| 402 | ops = &ocfs2_inode_open_lops; | 402 | ops = &ocfs2_inode_open_lops; |
| @@ -1138,7 +1138,7 @@ int ocfs2_create_new_inode_locks(struct inode *inode) | |||
| 1138 | * We don't want to use LKM_LOCAL on a meta data lock as they | 1138 | * We don't want to use LKM_LOCAL on a meta data lock as they |
| 1139 | * don't use a generation in their lock names. | 1139 | * don't use a generation in their lock names. |
| 1140 | */ | 1140 | */ |
| 1141 | ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_meta_lockres, 1, 0); | 1141 | ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_inode_lockres, 1, 0); |
| 1142 | if (ret) { | 1142 | if (ret) { |
| 1143 | mlog_errno(ret); | 1143 | mlog_errno(ret); |
| 1144 | goto bail; | 1144 | goto bail; |
| @@ -1346,11 +1346,11 @@ static u64 ocfs2_pack_timespec(struct timespec *spec) | |||
| 1346 | 1346 | ||
| 1347 | /* Call this with the lockres locked. I am reasonably sure we don't | 1347 | /* Call this with the lockres locked. I am reasonably sure we don't |
| 1348 | * need ip_lock in this function as anyone who would be changing those | 1348 | * need ip_lock in this function as anyone who would be changing those |
| 1349 | * values is supposed to be blocked in ocfs2_meta_lock right now. */ | 1349 | * values is supposed to be blocked in ocfs2_inode_lock right now. */ |
| 1350 | static void __ocfs2_stuff_meta_lvb(struct inode *inode) | 1350 | static void __ocfs2_stuff_meta_lvb(struct inode *inode) |
| 1351 | { | 1351 | { |
| 1352 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1352 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
| 1353 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1353 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
| 1354 | struct ocfs2_meta_lvb *lvb; | 1354 | struct ocfs2_meta_lvb *lvb; |
| 1355 | 1355 | ||
| 1356 | mlog_entry_void(); | 1356 | mlog_entry_void(); |
| @@ -1400,7 +1400,7 @@ static void ocfs2_unpack_timespec(struct timespec *spec, | |||
| 1400 | static void ocfs2_refresh_inode_from_lvb(struct inode *inode) | 1400 | static void ocfs2_refresh_inode_from_lvb(struct inode *inode) |
| 1401 | { | 1401 | { |
| 1402 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1402 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
| 1403 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1403 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
| 1404 | struct ocfs2_meta_lvb *lvb; | 1404 | struct ocfs2_meta_lvb *lvb; |
| 1405 | 1405 | ||
| 1406 | mlog_entry_void(); | 1406 | mlog_entry_void(); |
| @@ -1508,12 +1508,12 @@ static inline void ocfs2_complete_lock_res_refresh(struct ocfs2_lock_res *lockre | |||
| 1508 | } | 1508 | } |
| 1509 | 1509 | ||
| 1510 | /* may or may not return a bh if it went to disk. */ | 1510 | /* may or may not return a bh if it went to disk. */ |
| 1511 | static int ocfs2_meta_lock_update(struct inode *inode, | 1511 | static int ocfs2_inode_lock_update(struct inode *inode, |
| 1512 | struct buffer_head **bh) | 1512 | struct buffer_head **bh) |
| 1513 | { | 1513 | { |
| 1514 | int status = 0; | 1514 | int status = 0; |
| 1515 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1515 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
| 1516 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1516 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
| 1517 | struct ocfs2_dinode *fe; | 1517 | struct ocfs2_dinode *fe; |
| 1518 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1518 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
| 1519 | 1519 | ||
| @@ -1625,7 +1625,7 @@ static int ocfs2_assign_bh(struct inode *inode, | |||
| 1625 | * returns < 0 error if the callback will never be called, otherwise | 1625 | * returns < 0 error if the callback will never be called, otherwise |
| 1626 | * the result of the lock will be communicated via the callback. | 1626 | * the result of the lock will be communicated via the callback. |
| 1627 | */ | 1627 | */ |
| 1628 | int ocfs2_meta_lock_full(struct inode *inode, | 1628 | int ocfs2_inode_lock_full(struct inode *inode, |
| 1629 | struct buffer_head **ret_bh, | 1629 | struct buffer_head **ret_bh, |
| 1630 | int ex, | 1630 | int ex, |
| 1631 | int arg_flags) | 1631 | int arg_flags) |
| @@ -1660,7 +1660,7 @@ int ocfs2_meta_lock_full(struct inode *inode, | |||
| 1660 | wait_event(osb->recovery_event, | 1660 | wait_event(osb->recovery_event, |
| 1661 | ocfs2_node_map_is_empty(osb, &osb->recovery_map)); | 1661 | ocfs2_node_map_is_empty(osb, &osb->recovery_map)); |
| 1662 | 1662 | ||
| 1663 | lockres = &OCFS2_I(inode)->ip_meta_lockres; | 1663 | lockres = &OCFS2_I(inode)->ip_inode_lockres; |
| 1664 | level = ex ? LKM_EXMODE : LKM_PRMODE; | 1664 | level = ex ? LKM_EXMODE : LKM_PRMODE; |
| 1665 | dlm_flags = 0; | 1665 | dlm_flags = 0; |
| 1666 | if (arg_flags & OCFS2_META_LOCK_NOQUEUE) | 1666 | if (arg_flags & OCFS2_META_LOCK_NOQUEUE) |
| @@ -1699,11 +1699,11 @@ local: | |||
| 1699 | } | 1699 | } |
| 1700 | 1700 | ||
| 1701 | /* This is fun. The caller may want a bh back, or it may | 1701 | /* This is fun. The caller may want a bh back, or it may |
| 1702 | * not. ocfs2_meta_lock_update definitely wants one in, but | 1702 | * not. ocfs2_inode_lock_update definitely wants one in, but |
| 1703 | * may or may not read one, depending on what's in the | 1703 | * may or may not read one, depending on what's in the |
| 1704 | * LVB. The result of all of this is that we've *only* gone to | 1704 | * LVB. The result of all of this is that we've *only* gone to |
| 1705 | * disk if we have to, so the complexity is worthwhile. */ | 1705 | * disk if we have to, so the complexity is worthwhile. */ |
| 1706 | status = ocfs2_meta_lock_update(inode, &local_bh); | 1706 | status = ocfs2_inode_lock_update(inode, &local_bh); |
| 1707 | if (status < 0) { | 1707 | if (status < 0) { |
| 1708 | if (status != -ENOENT) | 1708 | if (status != -ENOENT) |
| 1709 | mlog_errno(status); | 1709 | mlog_errno(status); |
| @@ -1725,7 +1725,7 @@ bail: | |||
| 1725 | *ret_bh = NULL; | 1725 | *ret_bh = NULL; |
| 1726 | } | 1726 | } |
| 1727 | if (acquired) | 1727 | if (acquired) |
| 1728 | ocfs2_meta_unlock(inode, ex); | 1728 | ocfs2_inode_unlock(inode, ex); |
| 1729 | } | 1729 | } |
| 1730 | 1730 | ||
| 1731 | if (local_bh) | 1731 | if (local_bh) |
| @@ -1757,32 +1757,32 @@ bail: | |||
| 1757 | * ping locks back and forth, but that's a risk we're willing to take to avoid | 1757 | * ping locks back and forth, but that's a risk we're willing to take to avoid |
| 1758 | * the lock inversion simply. | 1758 | * the lock inversion simply. |
| 1759 | */ | 1759 | */ |
| 1760 | int ocfs2_meta_lock_with_page(struct inode *inode, | 1760 | int ocfs2_inode_lock_with_page(struct inode *inode, |
| 1761 | struct buffer_head **ret_bh, | 1761 | struct buffer_head **ret_bh, |
| 1762 | int ex, | 1762 | int ex, |
| 1763 | struct page *page) | 1763 | struct page *page) |
| 1764 | { | 1764 | { |
| 1765 | int ret; | 1765 | int ret; |
| 1766 | 1766 | ||
| 1767 | ret = ocfs2_meta_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); | 1767 | ret = ocfs2_inode_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); |
| 1768 | if (ret == -EAGAIN) { | 1768 | if (ret == -EAGAIN) { |
| 1769 | unlock_page(page); | 1769 | unlock_page(page); |
| 1770 | if (ocfs2_meta_lock(inode, ret_bh, ex) == 0) | 1770 | if (ocfs2_inode_lock(inode, ret_bh, ex) == 0) |
| 1771 | ocfs2_meta_unlock(inode, ex); | 1771 | ocfs2_inode_unlock(inode, ex); |
| 1772 | ret = AOP_TRUNCATED_PAGE; | 1772 | ret = AOP_TRUNCATED_PAGE; |
| 1773 | } | 1773 | } |
| 1774 | 1774 | ||
| 1775 | return ret; | 1775 | return ret; |
| 1776 | } | 1776 | } |
| 1777 | 1777 | ||
| 1778 | int ocfs2_meta_lock_atime(struct inode *inode, | 1778 | int ocfs2_inode_lock_atime(struct inode *inode, |
| 1779 | struct vfsmount *vfsmnt, | 1779 | struct vfsmount *vfsmnt, |
| 1780 | int *level) | 1780 | int *level) |
| 1781 | { | 1781 | { |
| 1782 | int ret; | 1782 | int ret; |
| 1783 | 1783 | ||
| 1784 | mlog_entry_void(); | 1784 | mlog_entry_void(); |
| 1785 | ret = ocfs2_meta_lock(inode, NULL, 0); | 1785 | ret = ocfs2_inode_lock(inode, NULL, 0); |
| 1786 | if (ret < 0) { | 1786 | if (ret < 0) { |
| 1787 | mlog_errno(ret); | 1787 | mlog_errno(ret); |
| 1788 | return ret; | 1788 | return ret; |
| @@ -1795,8 +1795,8 @@ int ocfs2_meta_lock_atime(struct inode *inode, | |||
| 1795 | if (ocfs2_should_update_atime(inode, vfsmnt)) { | 1795 | if (ocfs2_should_update_atime(inode, vfsmnt)) { |
| 1796 | struct buffer_head *bh = NULL; | 1796 | struct buffer_head *bh = NULL; |
| 1797 | 1797 | ||
| 1798 | ocfs2_meta_unlock(inode, 0); | 1798 | ocfs2_inode_unlock(inode, 0); |
| 1799 | ret = ocfs2_meta_lock(inode, &bh, 1); | 1799 | ret = ocfs2_inode_lock(inode, &bh, 1); |
| 1800 | if (ret < 0) { | 1800 | if (ret < 0) { |
| 1801 | mlog_errno(ret); | 1801 | mlog_errno(ret); |
| 1802 | return ret; | 1802 | return ret; |
| @@ -1813,11 +1813,11 @@ int ocfs2_meta_lock_atime(struct inode *inode, | |||
| 1813 | return ret; | 1813 | return ret; |
| 1814 | } | 1814 | } |
| 1815 | 1815 | ||
| 1816 | void ocfs2_meta_unlock(struct inode *inode, | 1816 | void ocfs2_inode_unlock(struct inode *inode, |
| 1817 | int ex) | 1817 | int ex) |
| 1818 | { | 1818 | { |
| 1819 | int level = ex ? LKM_EXMODE : LKM_PRMODE; | 1819 | int level = ex ? LKM_EXMODE : LKM_PRMODE; |
| 1820 | struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_meta_lockres; | 1820 | struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_inode_lockres; |
| 1821 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1821 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
| 1822 | 1822 | ||
| 1823 | mlog_entry_void(); | 1823 | mlog_entry_void(); |
| @@ -2495,7 +2495,7 @@ int ocfs2_drop_inode_locks(struct inode *inode) | |||
| 2495 | status = err; | 2495 | status = err; |
| 2496 | 2496 | ||
| 2497 | err = ocfs2_drop_lock(OCFS2_SB(inode->i_sb), | 2497 | err = ocfs2_drop_lock(OCFS2_SB(inode->i_sb), |
| 2498 | &OCFS2_I(inode)->ip_meta_lockres); | 2498 | &OCFS2_I(inode)->ip_inode_lockres); |
| 2499 | if (err < 0) | 2499 | if (err < 0) |
| 2500 | mlog_errno(err); | 2500 | mlog_errno(err); |
| 2501 | if (err < 0 && !status) | 2501 | if (err < 0 && !status) |
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h index 3fd7729daeef..6dcbc944e8ce 100644 --- a/fs/ocfs2/dlmglue.h +++ b/fs/ocfs2/dlmglue.h | |||
| @@ -49,7 +49,7 @@ struct ocfs2_meta_lvb { | |||
| 49 | __be32 lvb_reserved2; | 49 | __be32 lvb_reserved2; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /* ocfs2_meta_lock_full() 'arg_flags' flags */ | 52 | /* ocfs2_inode_lock_full() 'arg_flags' flags */ |
| 53 | /* don't wait on recovery. */ | 53 | /* don't wait on recovery. */ |
| 54 | #define OCFS2_META_LOCK_RECOVERY (0x01) | 54 | #define OCFS2_META_LOCK_RECOVERY (0x01) |
| 55 | /* Instruct the dlm not to queue ourselves on the other node. */ | 55 | /* Instruct the dlm not to queue ourselves on the other node. */ |
| @@ -74,21 +74,21 @@ void ocfs2_rw_unlock(struct inode *inode, int write); | |||
| 74 | int ocfs2_open_lock(struct inode *inode); | 74 | int ocfs2_open_lock(struct inode *inode); |
| 75 | int ocfs2_try_open_lock(struct inode *inode, int write); | 75 | int ocfs2_try_open_lock(struct inode *inode, int write); |
| 76 | void ocfs2_open_unlock(struct inode *inode); | 76 | void ocfs2_open_unlock(struct inode *inode); |
| 77 | int ocfs2_meta_lock_atime(struct inode *inode, | 77 | int ocfs2_inode_lock_atime(struct inode *inode, |
| 78 | struct vfsmount *vfsmnt, | 78 | struct vfsmount *vfsmnt, |
| 79 | int *level); | 79 | int *level); |
| 80 | int ocfs2_meta_lock_full(struct inode *inode, | 80 | int ocfs2_inode_lock_full(struct inode *inode, |
| 81 | struct buffer_head **ret_bh, | 81 | struct buffer_head **ret_bh, |
| 82 | int ex, | 82 | int ex, |
| 83 | int arg_flags); | 83 | int arg_flags); |
| 84 | int ocfs2_meta_lock_with_page(struct inode *inode, | 84 | int ocfs2_inode_lock_with_page(struct inode *inode, |
| 85 | struct buffer_head **ret_bh, | 85 | struct buffer_head **ret_bh, |
| 86 | int ex, | 86 | int ex, |
| 87 | struct page *page); | 87 | struct page *page); |
| 88 | /* 99% of the time we don't want to supply any additional flags -- | 88 | /* 99% of the time we don't want to supply any additional flags -- |
| 89 | * those are for very specific cases only. */ | 89 | * those are for very specific cases only. */ |
| 90 | #define ocfs2_meta_lock(i, b, e) ocfs2_meta_lock_full(i, b, e, 0) | 90 | #define ocfs2_inode_lock(i, b, e) ocfs2_inode_lock_full(i, b, e, 0) |
| 91 | void ocfs2_meta_unlock(struct inode *inode, | 91 | void ocfs2_inode_unlock(struct inode *inode, |
| 92 | int ex); | 92 | int ex); |
| 93 | int ocfs2_super_lock(struct ocfs2_super *osb, | 93 | int ocfs2_super_lock(struct ocfs2_super *osb, |
| 94 | int ex); | 94 | int ex); |
diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 535bfa9568a4..1f9e353cac45 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c | |||
| @@ -95,7 +95,7 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) | |||
| 95 | mlog(0, "find parent of directory %llu\n", | 95 | mlog(0, "find parent of directory %llu\n", |
| 96 | (unsigned long long)OCFS2_I(dir)->ip_blkno); | 96 | (unsigned long long)OCFS2_I(dir)->ip_blkno); |
| 97 | 97 | ||
| 98 | status = ocfs2_meta_lock(dir, NULL, 0); | 98 | status = ocfs2_inode_lock(dir, NULL, 0); |
| 99 | if (status < 0) { | 99 | if (status < 0) { |
| 100 | if (status != -ENOENT) | 100 | if (status != -ENOENT) |
| 101 | mlog_errno(status); | 101 | mlog_errno(status); |
| @@ -126,7 +126,7 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) | |||
| 126 | parent->d_op = &ocfs2_dentry_ops; | 126 | parent->d_op = &ocfs2_dentry_ops; |
| 127 | 127 | ||
| 128 | bail_unlock: | 128 | bail_unlock: |
| 129 | ocfs2_meta_unlock(dir, 0); | 129 | ocfs2_inode_unlock(dir, 0); |
| 130 | 130 | ||
| 131 | bail: | 131 | bail: |
| 132 | mlog_exit_ptr(parent); | 132 | mlog_exit_ptr(parent); |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index c5c183ac41fe..432e5f3c4784 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
| @@ -1025,7 +1025,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
| 1025 | } | 1025 | } |
| 1026 | } | 1026 | } |
| 1027 | 1027 | ||
| 1028 | status = ocfs2_meta_lock(inode, &bh, 1); | 1028 | status = ocfs2_inode_lock(inode, &bh, 1); |
| 1029 | if (status < 0) { | 1029 | if (status < 0) { |
| 1030 | if (status != -ENOENT) | 1030 | if (status != -ENOENT) |
| 1031 | mlog_errno(status); | 1031 | mlog_errno(status); |
| @@ -1077,7 +1077,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
| 1077 | bail_commit: | 1077 | bail_commit: |
| 1078 | ocfs2_commit_trans(osb, handle); | 1078 | ocfs2_commit_trans(osb, handle); |
| 1079 | bail_unlock: | 1079 | bail_unlock: |
| 1080 | ocfs2_meta_unlock(inode, 1); | 1080 | ocfs2_inode_unlock(inode, 1); |
| 1081 | bail_unlock_rw: | 1081 | bail_unlock_rw: |
| 1082 | if (size_change) | 1082 | if (size_change) |
| 1083 | ocfs2_rw_unlock(inode, 1); | 1083 | ocfs2_rw_unlock(inode, 1); |
| @@ -1124,7 +1124,7 @@ int ocfs2_permission(struct inode *inode, int mask, struct nameidata *nd) | |||
| 1124 | 1124 | ||
| 1125 | mlog_entry_void(); | 1125 | mlog_entry_void(); |
| 1126 | 1126 | ||
| 1127 | ret = ocfs2_meta_lock(inode, NULL, 0); | 1127 | ret = ocfs2_inode_lock(inode, NULL, 0); |
| 1128 | if (ret) { | 1128 | if (ret) { |
| 1129 | if (ret != -ENOENT) | 1129 | if (ret != -ENOENT) |
| 1130 | mlog_errno(ret); | 1130 | mlog_errno(ret); |
| @@ -1133,7 +1133,7 @@ int ocfs2_permission(struct inode *inode, int mask, struct nameidata *nd) | |||
| 1133 | 1133 | ||
| 1134 | ret = generic_permission(inode, mask, NULL); | 1134 | ret = generic_permission(inode, mask, NULL); |
| 1135 | 1135 | ||
| 1136 | ocfs2_meta_unlock(inode, 0); | 1136 | ocfs2_inode_unlock(inode, 0); |
| 1137 | out: | 1137 | out: |
| 1138 | mlog_exit(ret); | 1138 | mlog_exit(ret); |
| 1139 | return ret; | 1139 | return ret; |
| @@ -1605,7 +1605,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1605 | goto out; | 1605 | goto out; |
| 1606 | } | 1606 | } |
| 1607 | 1607 | ||
| 1608 | ret = ocfs2_meta_lock(inode, &di_bh, 1); | 1608 | ret = ocfs2_inode_lock(inode, &di_bh, 1); |
| 1609 | if (ret) { | 1609 | if (ret) { |
| 1610 | mlog_errno(ret); | 1610 | mlog_errno(ret); |
| 1611 | goto out_rw_unlock; | 1611 | goto out_rw_unlock; |
| @@ -1613,7 +1613,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1613 | 1613 | ||
| 1614 | if (inode->i_flags & (S_IMMUTABLE|S_APPEND)) { | 1614 | if (inode->i_flags & (S_IMMUTABLE|S_APPEND)) { |
| 1615 | ret = -EPERM; | 1615 | ret = -EPERM; |
| 1616 | goto out_meta_unlock; | 1616 | goto out_inode_unlock; |
| 1617 | } | 1617 | } |
| 1618 | 1618 | ||
| 1619 | switch (sr->l_whence) { | 1619 | switch (sr->l_whence) { |
| @@ -1627,7 +1627,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1627 | break; | 1627 | break; |
| 1628 | default: | 1628 | default: |
| 1629 | ret = -EINVAL; | 1629 | ret = -EINVAL; |
| 1630 | goto out_meta_unlock; | 1630 | goto out_inode_unlock; |
| 1631 | } | 1631 | } |
| 1632 | sr->l_whence = 0; | 1632 | sr->l_whence = 0; |
| 1633 | 1633 | ||
| @@ -1638,14 +1638,14 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1638 | || (sr->l_start + llen) < 0 | 1638 | || (sr->l_start + llen) < 0 |
| 1639 | || (sr->l_start + llen) > max_off) { | 1639 | || (sr->l_start + llen) > max_off) { |
| 1640 | ret = -EINVAL; | 1640 | ret = -EINVAL; |
| 1641 | goto out_meta_unlock; | 1641 | goto out_inode_unlock; |
| 1642 | } | 1642 | } |
| 1643 | size = sr->l_start + sr->l_len; | 1643 | size = sr->l_start + sr->l_len; |
| 1644 | 1644 | ||
| 1645 | if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64) { | 1645 | if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64) { |
| 1646 | if (sr->l_len <= 0) { | 1646 | if (sr->l_len <= 0) { |
| 1647 | ret = -EINVAL; | 1647 | ret = -EINVAL; |
| 1648 | goto out_meta_unlock; | 1648 | goto out_inode_unlock; |
| 1649 | } | 1649 | } |
| 1650 | } | 1650 | } |
| 1651 | 1651 | ||
| @@ -1653,7 +1653,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1653 | ret = __ocfs2_write_remove_suid(inode, di_bh); | 1653 | ret = __ocfs2_write_remove_suid(inode, di_bh); |
| 1654 | if (ret) { | 1654 | if (ret) { |
| 1655 | mlog_errno(ret); | 1655 | mlog_errno(ret); |
| 1656 | goto out_meta_unlock; | 1656 | goto out_inode_unlock; |
| 1657 | } | 1657 | } |
| 1658 | } | 1658 | } |
| 1659 | 1659 | ||
| @@ -1679,7 +1679,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1679 | up_write(&OCFS2_I(inode)->ip_alloc_sem); | 1679 | up_write(&OCFS2_I(inode)->ip_alloc_sem); |
| 1680 | if (ret) { | 1680 | if (ret) { |
| 1681 | mlog_errno(ret); | 1681 | mlog_errno(ret); |
| 1682 | goto out_meta_unlock; | 1682 | goto out_inode_unlock; |
| 1683 | } | 1683 | } |
| 1684 | 1684 | ||
| 1685 | /* | 1685 | /* |
| @@ -1689,7 +1689,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1689 | if (IS_ERR(handle)) { | 1689 | if (IS_ERR(handle)) { |
| 1690 | ret = PTR_ERR(handle); | 1690 | ret = PTR_ERR(handle); |
| 1691 | mlog_errno(ret); | 1691 | mlog_errno(ret); |
| 1692 | goto out_meta_unlock; | 1692 | goto out_inode_unlock; |
| 1693 | } | 1693 | } |
| 1694 | 1694 | ||
| 1695 | if (change_size && i_size_read(inode) < size) | 1695 | if (change_size && i_size_read(inode) < size) |
| @@ -1702,9 +1702,9 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, | |||
| 1702 | 1702 | ||
| 1703 | ocfs2_commit_trans(osb, handle); | 1703 | ocfs2_commit_trans(osb, handle); |
| 1704 | 1704 | ||
| 1705 | out_meta_unlock: | 1705 | out_inode_unlock: |
| 1706 | brelse(di_bh); | 1706 | brelse(di_bh); |
| 1707 | ocfs2_meta_unlock(inode, 1); | 1707 | ocfs2_inode_unlock(inode, 1); |
| 1708 | out_rw_unlock: | 1708 | out_rw_unlock: |
| 1709 | ocfs2_rw_unlock(inode, 1); | 1709 | ocfs2_rw_unlock(inode, 1); |
| 1710 | 1710 | ||
| @@ -1774,7 +1774,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
| 1774 | * if we need to make modifications here. | 1774 | * if we need to make modifications here. |
| 1775 | */ | 1775 | */ |
| 1776 | for(;;) { | 1776 | for(;;) { |
| 1777 | ret = ocfs2_meta_lock(inode, NULL, meta_level); | 1777 | ret = ocfs2_inode_lock(inode, NULL, meta_level); |
| 1778 | if (ret < 0) { | 1778 | if (ret < 0) { |
| 1779 | meta_level = -1; | 1779 | meta_level = -1; |
| 1780 | mlog_errno(ret); | 1780 | mlog_errno(ret); |
| @@ -1792,7 +1792,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
| 1792 | * set inode->i_size at the end of a write. */ | 1792 | * set inode->i_size at the end of a write. */ |
| 1793 | if (should_remove_suid(dentry)) { | 1793 | if (should_remove_suid(dentry)) { |
| 1794 | if (meta_level == 0) { | 1794 | if (meta_level == 0) { |
| 1795 | ocfs2_meta_unlock(inode, meta_level); | 1795 | ocfs2_inode_unlock(inode, meta_level); |
| 1796 | meta_level = 1; | 1796 | meta_level = 1; |
| 1797 | continue; | 1797 | continue; |
| 1798 | } | 1798 | } |
| @@ -1861,7 +1861,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
| 1861 | *ppos = saved_pos; | 1861 | *ppos = saved_pos; |
| 1862 | 1862 | ||
| 1863 | out_unlock: | 1863 | out_unlock: |
| 1864 | ocfs2_meta_unlock(inode, meta_level); | 1864 | ocfs2_inode_unlock(inode, meta_level); |
| 1865 | 1865 | ||
| 1866 | out: | 1866 | out: |
| 1867 | return ret; | 1867 | return ret; |
| @@ -2074,12 +2074,12 @@ static ssize_t ocfs2_file_splice_read(struct file *in, | |||
| 2074 | /* | 2074 | /* |
| 2075 | * See the comment in ocfs2_file_aio_read() | 2075 | * See the comment in ocfs2_file_aio_read() |
| 2076 | */ | 2076 | */ |
| 2077 | ret = ocfs2_meta_lock(inode, NULL, 0); | 2077 | ret = ocfs2_inode_lock(inode, NULL, 0); |
| 2078 | if (ret < 0) { | 2078 | if (ret < 0) { |
| 2079 | mlog_errno(ret); | 2079 | mlog_errno(ret); |
| 2080 | goto bail; | 2080 | goto bail; |
| 2081 | } | 2081 | } |
| 2082 | ocfs2_meta_unlock(inode, 0); | 2082 | ocfs2_inode_unlock(inode, 0); |
| 2083 | 2083 | ||
| 2084 | ret = generic_file_splice_read(in, ppos, pipe, len, flags); | 2084 | ret = generic_file_splice_read(in, ppos, pipe, len, flags); |
| 2085 | 2085 | ||
| @@ -2135,12 +2135,12 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, | |||
| 2135 | * like i_size. This allows the checks down below | 2135 | * like i_size. This allows the checks down below |
| 2136 | * generic_file_aio_read() a chance of actually working. | 2136 | * generic_file_aio_read() a chance of actually working. |
| 2137 | */ | 2137 | */ |
| 2138 | ret = ocfs2_meta_lock_atime(inode, filp->f_vfsmnt, &lock_level); | 2138 | ret = ocfs2_inode_lock_atime(inode, filp->f_vfsmnt, &lock_level); |
| 2139 | if (ret < 0) { | 2139 | if (ret < 0) { |
| 2140 | mlog_errno(ret); | 2140 | mlog_errno(ret); |
| 2141 | goto bail; | 2141 | goto bail; |
| 2142 | } | 2142 | } |
| 2143 | ocfs2_meta_unlock(inode, lock_level); | 2143 | ocfs2_inode_unlock(inode, lock_level); |
| 2144 | 2144 | ||
| 2145 | ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos); | 2145 | ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos); |
| 2146 | if (ret == -EINVAL) | 2146 | if (ret == -EINVAL) |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 8ff201d3705e..00cd5b7f3e52 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
| @@ -321,7 +321,7 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
| 321 | */ | 321 | */ |
| 322 | BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL); | 322 | BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL); |
| 323 | 323 | ||
| 324 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_meta_lockres, | 324 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, |
| 325 | OCFS2_LOCK_TYPE_META, 0, inode); | 325 | OCFS2_LOCK_TYPE_META, 0, inode); |
| 326 | 326 | ||
| 327 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, | 327 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, |
| @@ -409,7 +409,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
| 409 | if (args->fi_flags & OCFS2_FI_FLAG_SYSFILE) | 409 | if (args->fi_flags & OCFS2_FI_FLAG_SYSFILE) |
| 410 | generation = osb->fs_generation; | 410 | generation = osb->fs_generation; |
| 411 | 411 | ||
| 412 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_meta_lockres, | 412 | ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, |
| 413 | OCFS2_LOCK_TYPE_META, | 413 | OCFS2_LOCK_TYPE_META, |
| 414 | generation, inode); | 414 | generation, inode); |
| 415 | 415 | ||
| @@ -424,7 +424,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
| 424 | mlog_errno(status); | 424 | mlog_errno(status); |
| 425 | return status; | 425 | return status; |
| 426 | } | 426 | } |
| 427 | status = ocfs2_meta_lock(inode, NULL, 0); | 427 | status = ocfs2_inode_lock(inode, NULL, 0); |
| 428 | if (status) { | 428 | if (status) { |
| 429 | make_bad_inode(inode); | 429 | make_bad_inode(inode); |
| 430 | mlog_errno(status); | 430 | mlog_errno(status); |
| @@ -479,7 +479,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
| 479 | 479 | ||
| 480 | bail: | 480 | bail: |
| 481 | if (can_lock) | 481 | if (can_lock) |
| 482 | ocfs2_meta_unlock(inode, 0); | 482 | ocfs2_inode_unlock(inode, 0); |
| 483 | 483 | ||
| 484 | if (status < 0) | 484 | if (status < 0) |
| 485 | make_bad_inode(inode); | 485 | make_bad_inode(inode); |
| @@ -581,7 +581,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | mutex_lock(&inode_alloc_inode->i_mutex); | 583 | mutex_lock(&inode_alloc_inode->i_mutex); |
| 584 | status = ocfs2_meta_lock(inode_alloc_inode, &inode_alloc_bh, 1); | 584 | status = ocfs2_inode_lock(inode_alloc_inode, &inode_alloc_bh, 1); |
| 585 | if (status < 0) { | 585 | if (status < 0) { |
| 586 | mutex_unlock(&inode_alloc_inode->i_mutex); | 586 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| 587 | 587 | ||
| @@ -630,7 +630,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 630 | bail_commit: | 630 | bail_commit: |
| 631 | ocfs2_commit_trans(osb, handle); | 631 | ocfs2_commit_trans(osb, handle); |
| 632 | bail_unlock: | 632 | bail_unlock: |
| 633 | ocfs2_meta_unlock(inode_alloc_inode, 1); | 633 | ocfs2_inode_unlock(inode_alloc_inode, 1); |
| 634 | mutex_unlock(&inode_alloc_inode->i_mutex); | 634 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| 635 | brelse(inode_alloc_bh); | 635 | brelse(inode_alloc_bh); |
| 636 | bail: | 636 | bail: |
| @@ -704,7 +704,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
| 704 | * delete_inode operation. We do this now to avoid races with | 704 | * delete_inode operation. We do this now to avoid races with |
| 705 | * recovery completion on other nodes. */ | 705 | * recovery completion on other nodes. */ |
| 706 | mutex_lock(&orphan_dir_inode->i_mutex); | 706 | mutex_lock(&orphan_dir_inode->i_mutex); |
| 707 | status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1); | 707 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
| 708 | if (status < 0) { | 708 | if (status < 0) { |
| 709 | mutex_unlock(&orphan_dir_inode->i_mutex); | 709 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 710 | 710 | ||
| @@ -728,7 +728,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
| 728 | mlog_errno(status); | 728 | mlog_errno(status); |
| 729 | 729 | ||
| 730 | bail_unlock_dir: | 730 | bail_unlock_dir: |
| 731 | ocfs2_meta_unlock(orphan_dir_inode, 1); | 731 | ocfs2_inode_unlock(orphan_dir_inode, 1); |
| 732 | mutex_unlock(&orphan_dir_inode->i_mutex); | 732 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 733 | brelse(orphan_dir_bh); | 733 | brelse(orphan_dir_bh); |
| 734 | bail: | 734 | bail: |
| @@ -929,7 +929,7 @@ void ocfs2_delete_inode(struct inode *inode) | |||
| 929 | * allocation lock here as it won't be needed - nobody will | 929 | * allocation lock here as it won't be needed - nobody will |
| 930 | * have the file open. | 930 | * have the file open. |
| 931 | */ | 931 | */ |
| 932 | status = ocfs2_meta_lock(inode, &di_bh, 1); | 932 | status = ocfs2_inode_lock(inode, &di_bh, 1); |
| 933 | if (status < 0) { | 933 | if (status < 0) { |
| 934 | if (status != -ENOENT) | 934 | if (status != -ENOENT) |
| 935 | mlog_errno(status); | 935 | mlog_errno(status); |
| @@ -975,7 +975,7 @@ void ocfs2_delete_inode(struct inode *inode) | |||
| 975 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_DELETED; | 975 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_DELETED; |
| 976 | 976 | ||
| 977 | bail_unlock_inode: | 977 | bail_unlock_inode: |
| 978 | ocfs2_meta_unlock(inode, 1); | 978 | ocfs2_inode_unlock(inode, 1); |
| 979 | brelse(di_bh); | 979 | brelse(di_bh); |
| 980 | bail_unblock: | 980 | bail_unblock: |
| 981 | status = sigprocmask(SIG_SETMASK, &oldset, NULL); | 981 | status = sigprocmask(SIG_SETMASK, &oldset, NULL); |
| @@ -1009,7 +1009,7 @@ void ocfs2_clear_inode(struct inode *inode) | |||
| 1009 | /* Do these before all the other work so that we don't bounce | 1009 | /* Do these before all the other work so that we don't bounce |
| 1010 | * the downconvert thread while waiting to destroy the locks. */ | 1010 | * the downconvert thread while waiting to destroy the locks. */ |
| 1011 | ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); | 1011 | ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); |
| 1012 | ocfs2_mark_lockres_freeing(&oi->ip_meta_lockres); | 1012 | ocfs2_mark_lockres_freeing(&oi->ip_inode_lockres); |
| 1013 | ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); | 1013 | ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); |
| 1014 | 1014 | ||
| 1015 | /* We very well may get a clear_inode before all an inodes | 1015 | /* We very well may get a clear_inode before all an inodes |
| @@ -1032,7 +1032,7 @@ void ocfs2_clear_inode(struct inode *inode) | |||
| 1032 | mlog_errno(status); | 1032 | mlog_errno(status); |
| 1033 | 1033 | ||
| 1034 | ocfs2_lock_res_free(&oi->ip_rw_lockres); | 1034 | ocfs2_lock_res_free(&oi->ip_rw_lockres); |
| 1035 | ocfs2_lock_res_free(&oi->ip_meta_lockres); | 1035 | ocfs2_lock_res_free(&oi->ip_inode_lockres); |
| 1036 | ocfs2_lock_res_free(&oi->ip_open_lockres); | 1036 | ocfs2_lock_res_free(&oi->ip_open_lockres); |
| 1037 | 1037 | ||
| 1038 | ocfs2_metadata_cache_purge(inode); | 1038 | ocfs2_metadata_cache_purge(inode); |
| @@ -1176,15 +1176,15 @@ int ocfs2_inode_revalidate(struct dentry *dentry) | |||
| 1176 | } | 1176 | } |
| 1177 | spin_unlock(&OCFS2_I(inode)->ip_lock); | 1177 | spin_unlock(&OCFS2_I(inode)->ip_lock); |
| 1178 | 1178 | ||
| 1179 | /* Let ocfs2_meta_lock do the work of updating our struct | 1179 | /* Let ocfs2_inode_lock do the work of updating our struct |
| 1180 | * inode for us. */ | 1180 | * inode for us. */ |
| 1181 | status = ocfs2_meta_lock(inode, NULL, 0); | 1181 | status = ocfs2_inode_lock(inode, NULL, 0); |
| 1182 | if (status < 0) { | 1182 | if (status < 0) { |
| 1183 | if (status != -ENOENT) | 1183 | if (status != -ENOENT) |
| 1184 | mlog_errno(status); | 1184 | mlog_errno(status); |
| 1185 | goto bail; | 1185 | goto bail; |
| 1186 | } | 1186 | } |
| 1187 | ocfs2_meta_unlock(inode, 0); | 1187 | ocfs2_inode_unlock(inode, 0); |
| 1188 | bail: | 1188 | bail: |
| 1189 | mlog_exit(status); | 1189 | mlog_exit(status); |
| 1190 | 1190 | ||
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index d1c54da687c9..a61c044eb7da 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h | |||
| @@ -34,7 +34,7 @@ struct ocfs2_inode_info | |||
| 34 | u64 ip_blkno; | 34 | u64 ip_blkno; |
| 35 | 35 | ||
| 36 | struct ocfs2_lock_res ip_rw_lockres; | 36 | struct ocfs2_lock_res ip_rw_lockres; |
| 37 | struct ocfs2_lock_res ip_meta_lockres; | 37 | struct ocfs2_lock_res ip_inode_lockres; |
| 38 | struct ocfs2_lock_res ip_open_lockres; | 38 | struct ocfs2_lock_res ip_open_lockres; |
| 39 | 39 | ||
| 40 | /* protects allocation changes on this inode. */ | 40 | /* protects allocation changes on this inode. */ |
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 87dcece7e1b5..67c2fb4bae91 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
| @@ -27,14 +27,14 @@ static int ocfs2_get_inode_attr(struct inode *inode, unsigned *flags) | |||
| 27 | { | 27 | { |
| 28 | int status; | 28 | int status; |
| 29 | 29 | ||
| 30 | status = ocfs2_meta_lock(inode, NULL, 0); | 30 | status = ocfs2_inode_lock(inode, NULL, 0); |
| 31 | if (status < 0) { | 31 | if (status < 0) { |
| 32 | mlog_errno(status); | 32 | mlog_errno(status); |
| 33 | return status; | 33 | return status; |
| 34 | } | 34 | } |
| 35 | ocfs2_get_inode_flags(OCFS2_I(inode)); | 35 | ocfs2_get_inode_flags(OCFS2_I(inode)); |
| 36 | *flags = OCFS2_I(inode)->ip_attr; | 36 | *flags = OCFS2_I(inode)->ip_attr; |
| 37 | ocfs2_meta_unlock(inode, 0); | 37 | ocfs2_inode_unlock(inode, 0); |
| 38 | 38 | ||
| 39 | mlog_exit(status); | 39 | mlog_exit(status); |
| 40 | return status; | 40 | return status; |
| @@ -52,7 +52,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
| 52 | 52 | ||
| 53 | mutex_lock(&inode->i_mutex); | 53 | mutex_lock(&inode->i_mutex); |
| 54 | 54 | ||
| 55 | status = ocfs2_meta_lock(inode, &bh, 1); | 55 | status = ocfs2_inode_lock(inode, &bh, 1); |
| 56 | if (status < 0) { | 56 | if (status < 0) { |
| 57 | mlog_errno(status); | 57 | mlog_errno(status); |
| 58 | goto bail; | 58 | goto bail; |
| @@ -100,7 +100,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
| 100 | 100 | ||
| 101 | ocfs2_commit_trans(osb, handle); | 101 | ocfs2_commit_trans(osb, handle); |
| 102 | bail_unlock: | 102 | bail_unlock: |
| 103 | ocfs2_meta_unlock(inode, 1); | 103 | ocfs2_inode_unlock(inode, 1); |
| 104 | bail: | 104 | bail: |
| 105 | mutex_unlock(&inode->i_mutex); | 105 | mutex_unlock(&inode->i_mutex); |
| 106 | 106 | ||
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index f2ebe2eb3c21..4f440a88bf53 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
| @@ -336,7 +336,7 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty) | |||
| 336 | struct ocfs2_dinode *di = NULL; | 336 | struct ocfs2_dinode *di = NULL; |
| 337 | struct buffer_head *bh = NULL; | 337 | struct buffer_head *bh = NULL; |
| 338 | struct ocfs2_super *osb; | 338 | struct ocfs2_super *osb; |
| 339 | int meta_lock = 0; | 339 | int inode_lock = 0; |
| 340 | 340 | ||
| 341 | mlog_entry_void(); | 341 | mlog_entry_void(); |
| 342 | 342 | ||
| @@ -366,14 +366,14 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty) | |||
| 366 | /* Skip recovery waits here - journal inode metadata never | 366 | /* Skip recovery waits here - journal inode metadata never |
| 367 | * changes in a live cluster so it can be considered an | 367 | * changes in a live cluster so it can be considered an |
| 368 | * exception to the rule. */ | 368 | * exception to the rule. */ |
| 369 | status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); | 369 | status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); |
| 370 | if (status < 0) { | 370 | if (status < 0) { |
| 371 | if (status != -ERESTARTSYS) | 371 | if (status != -ERESTARTSYS) |
| 372 | mlog(ML_ERROR, "Could not get lock on journal!\n"); | 372 | mlog(ML_ERROR, "Could not get lock on journal!\n"); |
| 373 | goto done; | 373 | goto done; |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | meta_lock = 1; | 376 | inode_lock = 1; |
| 377 | di = (struct ocfs2_dinode *)bh->b_data; | 377 | di = (struct ocfs2_dinode *)bh->b_data; |
| 378 | 378 | ||
| 379 | if (inode->i_size < OCFS2_MIN_JOURNAL_SIZE) { | 379 | if (inode->i_size < OCFS2_MIN_JOURNAL_SIZE) { |
| @@ -413,8 +413,8 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty) | |||
| 413 | status = 0; | 413 | status = 0; |
| 414 | done: | 414 | done: |
| 415 | if (status < 0) { | 415 | if (status < 0) { |
| 416 | if (meta_lock) | 416 | if (inode_lock) |
| 417 | ocfs2_meta_unlock(inode, 1); | 417 | ocfs2_inode_unlock(inode, 1); |
| 418 | if (bh != NULL) | 418 | if (bh != NULL) |
| 419 | brelse(bh); | 419 | brelse(bh); |
| 420 | if (inode) { | 420 | if (inode) { |
| @@ -543,7 +543,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb) | |||
| 543 | OCFS2_I(inode)->ip_open_count--; | 543 | OCFS2_I(inode)->ip_open_count--; |
| 544 | 544 | ||
| 545 | /* unlock our journal */ | 545 | /* unlock our journal */ |
| 546 | ocfs2_meta_unlock(inode, 1); | 546 | ocfs2_inode_unlock(inode, 1); |
| 547 | 547 | ||
| 548 | brelse(journal->j_bh); | 548 | brelse(journal->j_bh); |
| 549 | journal->j_bh = NULL; | 549 | journal->j_bh = NULL; |
| @@ -972,9 +972,9 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb, | |||
| 972 | } | 972 | } |
| 973 | SET_INODE_JOURNAL(inode); | 973 | SET_INODE_JOURNAL(inode); |
| 974 | 974 | ||
| 975 | status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); | 975 | status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); |
| 976 | if (status < 0) { | 976 | if (status < 0) { |
| 977 | mlog(0, "status returned from ocfs2_meta_lock=%d\n", status); | 977 | mlog(0, "status returned from ocfs2_inode_lock=%d\n", status); |
| 978 | if (status != -ERESTARTSYS) | 978 | if (status != -ERESTARTSYS) |
| 979 | mlog(ML_ERROR, "Could not lock journal!\n"); | 979 | mlog(ML_ERROR, "Could not lock journal!\n"); |
| 980 | goto done; | 980 | goto done; |
| @@ -1046,7 +1046,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb, | |||
| 1046 | done: | 1046 | done: |
| 1047 | /* drop the lock on this nodes journal */ | 1047 | /* drop the lock on this nodes journal */ |
| 1048 | if (got_lock) | 1048 | if (got_lock) |
| 1049 | ocfs2_meta_unlock(inode, 1); | 1049 | ocfs2_inode_unlock(inode, 1); |
| 1050 | 1050 | ||
| 1051 | if (inode) | 1051 | if (inode) |
| 1052 | iput(inode); | 1052 | iput(inode); |
| @@ -1161,14 +1161,14 @@ static int ocfs2_trylock_journal(struct ocfs2_super *osb, | |||
| 1161 | SET_INODE_JOURNAL(inode); | 1161 | SET_INODE_JOURNAL(inode); |
| 1162 | 1162 | ||
| 1163 | flags = OCFS2_META_LOCK_RECOVERY | OCFS2_META_LOCK_NOQUEUE; | 1163 | flags = OCFS2_META_LOCK_RECOVERY | OCFS2_META_LOCK_NOQUEUE; |
| 1164 | status = ocfs2_meta_lock_full(inode, NULL, 1, flags); | 1164 | status = ocfs2_inode_lock_full(inode, NULL, 1, flags); |
| 1165 | if (status < 0) { | 1165 | if (status < 0) { |
| 1166 | if (status != -EAGAIN) | 1166 | if (status != -EAGAIN) |
| 1167 | mlog_errno(status); | 1167 | mlog_errno(status); |
| 1168 | goto bail; | 1168 | goto bail; |
| 1169 | } | 1169 | } |
| 1170 | 1170 | ||
| 1171 | ocfs2_meta_unlock(inode, 1); | 1171 | ocfs2_inode_unlock(inode, 1); |
| 1172 | bail: | 1172 | bail: |
| 1173 | if (inode) | 1173 | if (inode) |
| 1174 | iput(inode); | 1174 | iput(inode); |
| @@ -1276,7 +1276,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, | |||
| 1276 | } | 1276 | } |
| 1277 | 1277 | ||
| 1278 | mutex_lock(&orphan_dir_inode->i_mutex); | 1278 | mutex_lock(&orphan_dir_inode->i_mutex); |
| 1279 | status = ocfs2_meta_lock(orphan_dir_inode, NULL, 0); | 1279 | status = ocfs2_inode_lock(orphan_dir_inode, NULL, 0); |
| 1280 | if (status < 0) { | 1280 | if (status < 0) { |
| 1281 | mlog_errno(status); | 1281 | mlog_errno(status); |
| 1282 | goto out; | 1282 | goto out; |
| @@ -1292,7 +1292,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, | |||
| 1292 | *head = priv.head; | 1292 | *head = priv.head; |
| 1293 | 1293 | ||
| 1294 | out_cluster: | 1294 | out_cluster: |
| 1295 | ocfs2_meta_unlock(orphan_dir_inode, 0); | 1295 | ocfs2_inode_unlock(orphan_dir_inode, 0); |
| 1296 | out: | 1296 | out: |
| 1297 | mutex_unlock(&orphan_dir_inode->i_mutex); | 1297 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 1298 | iput(orphan_dir_inode); | 1298 | iput(orphan_dir_inode); |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 58ea88b5af36..0de0792fce7f 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
| @@ -231,7 +231,7 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) | |||
| 231 | 231 | ||
| 232 | mutex_lock(&main_bm_inode->i_mutex); | 232 | mutex_lock(&main_bm_inode->i_mutex); |
| 233 | 233 | ||
| 234 | status = ocfs2_meta_lock(main_bm_inode, &main_bm_bh, 1); | 234 | status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1); |
| 235 | if (status < 0) { | 235 | if (status < 0) { |
| 236 | mlog_errno(status); | 236 | mlog_errno(status); |
| 237 | goto out_mutex; | 237 | goto out_mutex; |
| @@ -286,7 +286,7 @@ out_unlock: | |||
| 286 | if (main_bm_bh) | 286 | if (main_bm_bh) |
| 287 | brelse(main_bm_bh); | 287 | brelse(main_bm_bh); |
| 288 | 288 | ||
| 289 | ocfs2_meta_unlock(main_bm_inode, 1); | 289 | ocfs2_inode_unlock(main_bm_inode, 1); |
| 290 | 290 | ||
| 291 | out_mutex: | 291 | out_mutex: |
| 292 | mutex_unlock(&main_bm_inode->i_mutex); | 292 | mutex_unlock(&main_bm_inode->i_mutex); |
| @@ -399,7 +399,7 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, | |||
| 399 | 399 | ||
| 400 | mutex_lock(&main_bm_inode->i_mutex); | 400 | mutex_lock(&main_bm_inode->i_mutex); |
| 401 | 401 | ||
| 402 | status = ocfs2_meta_lock(main_bm_inode, &main_bm_bh, 1); | 402 | status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1); |
| 403 | if (status < 0) { | 403 | if (status < 0) { |
| 404 | mlog_errno(status); | 404 | mlog_errno(status); |
| 405 | goto out_mutex; | 405 | goto out_mutex; |
| @@ -424,7 +424,7 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, | |||
| 424 | ocfs2_commit_trans(osb, handle); | 424 | ocfs2_commit_trans(osb, handle); |
| 425 | 425 | ||
| 426 | out_unlock: | 426 | out_unlock: |
| 427 | ocfs2_meta_unlock(main_bm_inode, 1); | 427 | ocfs2_inode_unlock(main_bm_inode, 1); |
| 428 | 428 | ||
| 429 | out_mutex: | 429 | out_mutex: |
| 430 | mutex_unlock(&main_bm_inode->i_mutex); | 430 | mutex_unlock(&main_bm_inode->i_mutex); |
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index a7f0ccc6fdd8..3dc18d67557c 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c | |||
| @@ -168,7 +168,7 @@ static int ocfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
| 168 | * node. Taking the data lock will also ensure that we don't | 168 | * node. Taking the data lock will also ensure that we don't |
| 169 | * attempt page truncation as part of a downconvert. | 169 | * attempt page truncation as part of a downconvert. |
| 170 | */ | 170 | */ |
| 171 | ret = ocfs2_meta_lock(inode, &di_bh, 1); | 171 | ret = ocfs2_inode_lock(inode, &di_bh, 1); |
| 172 | if (ret < 0) { | 172 | if (ret < 0) { |
| 173 | mlog_errno(ret); | 173 | mlog_errno(ret); |
| 174 | goto out; | 174 | goto out; |
| @@ -186,7 +186,7 @@ static int ocfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
| 186 | up_write(&OCFS2_I(inode)->ip_alloc_sem); | 186 | up_write(&OCFS2_I(inode)->ip_alloc_sem); |
| 187 | 187 | ||
| 188 | brelse(di_bh); | 188 | brelse(di_bh); |
| 189 | ocfs2_meta_unlock(inode, 1); | 189 | ocfs2_inode_unlock(inode, 1); |
| 190 | 190 | ||
| 191 | out: | 191 | out: |
| 192 | ret2 = ocfs2_vm_op_unblock_sigs(&oldset); | 192 | ret2 = ocfs2_vm_op_unblock_sigs(&oldset); |
| @@ -205,13 +205,13 @@ int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 205 | { | 205 | { |
| 206 | int ret = 0, lock_level = 0; | 206 | int ret = 0, lock_level = 0; |
| 207 | 207 | ||
| 208 | ret = ocfs2_meta_lock_atime(file->f_dentry->d_inode, | 208 | ret = ocfs2_inode_lock_atime(file->f_dentry->d_inode, |
| 209 | file->f_vfsmnt, &lock_level); | 209 | file->f_vfsmnt, &lock_level); |
| 210 | if (ret < 0) { | 210 | if (ret < 0) { |
| 211 | mlog_errno(ret); | 211 | mlog_errno(ret); |
| 212 | goto out; | 212 | goto out; |
| 213 | } | 213 | } |
| 214 | ocfs2_meta_unlock(file->f_dentry->d_inode, lock_level); | 214 | ocfs2_inode_unlock(file->f_dentry->d_inode, lock_level); |
| 215 | out: | 215 | out: |
| 216 | vma->vm_ops = &ocfs2_file_vm_ops; | 216 | vma->vm_ops = &ocfs2_file_vm_ops; |
| 217 | vma->vm_flags |= VM_CAN_NONLINEAR; | 217 | vma->vm_flags |= VM_CAN_NONLINEAR; |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 6295fd6ae469..74018caf8053 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
| @@ -115,7 +115,7 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
| 115 | mlog(0, "find name %.*s in directory %llu\n", dentry->d_name.len, | 115 | mlog(0, "find name %.*s in directory %llu\n", dentry->d_name.len, |
| 116 | dentry->d_name.name, (unsigned long long)OCFS2_I(dir)->ip_blkno); | 116 | dentry->d_name.name, (unsigned long long)OCFS2_I(dir)->ip_blkno); |
| 117 | 117 | ||
| 118 | status = ocfs2_meta_lock(dir, NULL, 0); | 118 | status = ocfs2_inode_lock(dir, NULL, 0); |
| 119 | if (status < 0) { | 119 | if (status < 0) { |
| 120 | if (status != -ENOENT) | 120 | if (status != -ENOENT) |
| 121 | mlog_errno(status); | 121 | mlog_errno(status); |
| @@ -176,7 +176,7 @@ bail_unlock: | |||
| 176 | * unlink on another node will message us to remove that | 176 | * unlink on another node will message us to remove that |
| 177 | * dentry under this lock so otherwise we can race this with | 177 | * dentry under this lock so otherwise we can race this with |
| 178 | * the downconvert thread and have a stale dentry. */ | 178 | * the downconvert thread and have a stale dentry. */ |
| 179 | ocfs2_meta_unlock(dir, 0); | 179 | ocfs2_inode_unlock(dir, 0); |
| 180 | 180 | ||
| 181 | bail: | 181 | bail: |
| 182 | 182 | ||
| @@ -208,7 +208,7 @@ static int ocfs2_mknod(struct inode *dir, | |||
| 208 | /* get our super block */ | 208 | /* get our super block */ |
| 209 | osb = OCFS2_SB(dir->i_sb); | 209 | osb = OCFS2_SB(dir->i_sb); |
| 210 | 210 | ||
| 211 | status = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 211 | status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
| 212 | if (status < 0) { | 212 | if (status < 0) { |
| 213 | if (status != -ENOENT) | 213 | if (status != -ENOENT) |
| 214 | mlog_errno(status); | 214 | mlog_errno(status); |
| @@ -322,7 +322,7 @@ leave: | |||
| 322 | if (handle) | 322 | if (handle) |
| 323 | ocfs2_commit_trans(osb, handle); | 323 | ocfs2_commit_trans(osb, handle); |
| 324 | 324 | ||
| 325 | ocfs2_meta_unlock(dir, 1); | 325 | ocfs2_inode_unlock(dir, 1); |
| 326 | 326 | ||
| 327 | if (status == -ENOSPC) | 327 | if (status == -ENOSPC) |
| 328 | mlog(0, "Disk is full\n"); | 328 | mlog(0, "Disk is full\n"); |
| @@ -552,7 +552,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
| 552 | if (S_ISDIR(inode->i_mode)) | 552 | if (S_ISDIR(inode->i_mode)) |
| 553 | return -EPERM; | 553 | return -EPERM; |
| 554 | 554 | ||
| 555 | err = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 555 | err = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
| 556 | if (err < 0) { | 556 | if (err < 0) { |
| 557 | if (err != -ENOENT) | 557 | if (err != -ENOENT) |
| 558 | mlog_errno(err); | 558 | mlog_errno(err); |
| @@ -577,7 +577,7 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
| 577 | goto out; | 577 | goto out; |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | err = ocfs2_meta_lock(inode, &fe_bh, 1); | 580 | err = ocfs2_inode_lock(inode, &fe_bh, 1); |
| 581 | if (err < 0) { | 581 | if (err < 0) { |
| 582 | if (err != -ENOENT) | 582 | if (err != -ENOENT) |
| 583 | mlog_errno(err); | 583 | mlog_errno(err); |
| @@ -642,10 +642,10 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
| 642 | out_commit: | 642 | out_commit: |
| 643 | ocfs2_commit_trans(osb, handle); | 643 | ocfs2_commit_trans(osb, handle); |
| 644 | out_unlock_inode: | 644 | out_unlock_inode: |
| 645 | ocfs2_meta_unlock(inode, 1); | 645 | ocfs2_inode_unlock(inode, 1); |
| 646 | 646 | ||
| 647 | out: | 647 | out: |
| 648 | ocfs2_meta_unlock(dir, 1); | 648 | ocfs2_inode_unlock(dir, 1); |
| 649 | 649 | ||
| 650 | if (de_bh) | 650 | if (de_bh) |
| 651 | brelse(de_bh); | 651 | brelse(de_bh); |
| @@ -719,7 +719,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
| 719 | return -EPERM; | 719 | return -EPERM; |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | status = ocfs2_meta_lock(dir, &parent_node_bh, 1); | 722 | status = ocfs2_inode_lock(dir, &parent_node_bh, 1); |
| 723 | if (status < 0) { | 723 | if (status < 0) { |
| 724 | if (status != -ENOENT) | 724 | if (status != -ENOENT) |
| 725 | mlog_errno(status); | 725 | mlog_errno(status); |
| @@ -744,7 +744,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
| 744 | goto leave; | 744 | goto leave; |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | status = ocfs2_meta_lock(inode, &fe_bh, 1); | 747 | status = ocfs2_inode_lock(inode, &fe_bh, 1); |
| 748 | if (status < 0) { | 748 | if (status < 0) { |
| 749 | if (status != -ENOENT) | 749 | if (status != -ENOENT) |
| 750 | mlog_errno(status); | 750 | mlog_errno(status); |
| @@ -840,13 +840,13 @@ leave: | |||
| 840 | ocfs2_commit_trans(osb, handle); | 840 | ocfs2_commit_trans(osb, handle); |
| 841 | 841 | ||
| 842 | if (child_locked) | 842 | if (child_locked) |
| 843 | ocfs2_meta_unlock(inode, 1); | 843 | ocfs2_inode_unlock(inode, 1); |
| 844 | 844 | ||
| 845 | ocfs2_meta_unlock(dir, 1); | 845 | ocfs2_inode_unlock(dir, 1); |
| 846 | 846 | ||
| 847 | if (orphan_dir) { | 847 | if (orphan_dir) { |
| 848 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ | 848 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ |
| 849 | ocfs2_meta_unlock(orphan_dir, 1); | 849 | ocfs2_inode_unlock(orphan_dir, 1); |
| 850 | mutex_unlock(&orphan_dir->i_mutex); | 850 | mutex_unlock(&orphan_dir->i_mutex); |
| 851 | iput(orphan_dir); | 851 | iput(orphan_dir); |
| 852 | } | 852 | } |
| @@ -907,7 +907,7 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, | |||
| 907 | inode1 = tmpinode; | 907 | inode1 = tmpinode; |
| 908 | } | 908 | } |
| 909 | /* lock id2 */ | 909 | /* lock id2 */ |
| 910 | status = ocfs2_meta_lock(inode2, bh2, 1); | 910 | status = ocfs2_inode_lock(inode2, bh2, 1); |
| 911 | if (status < 0) { | 911 | if (status < 0) { |
| 912 | if (status != -ENOENT) | 912 | if (status != -ENOENT) |
| 913 | mlog_errno(status); | 913 | mlog_errno(status); |
| @@ -916,14 +916,14 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, | |||
| 916 | } | 916 | } |
| 917 | 917 | ||
| 918 | /* lock id1 */ | 918 | /* lock id1 */ |
| 919 | status = ocfs2_meta_lock(inode1, bh1, 1); | 919 | status = ocfs2_inode_lock(inode1, bh1, 1); |
| 920 | if (status < 0) { | 920 | if (status < 0) { |
| 921 | /* | 921 | /* |
| 922 | * An error return must mean that no cluster locks | 922 | * An error return must mean that no cluster locks |
| 923 | * were held on function exit. | 923 | * were held on function exit. |
| 924 | */ | 924 | */ |
| 925 | if (oi1->ip_blkno != oi2->ip_blkno) | 925 | if (oi1->ip_blkno != oi2->ip_blkno) |
| 926 | ocfs2_meta_unlock(inode2, 1); | 926 | ocfs2_inode_unlock(inode2, 1); |
| 927 | 927 | ||
| 928 | if (status != -ENOENT) | 928 | if (status != -ENOENT) |
| 929 | mlog_errno(status); | 929 | mlog_errno(status); |
| @@ -936,10 +936,10 @@ bail: | |||
| 936 | 936 | ||
| 937 | static void ocfs2_double_unlock(struct inode *inode1, struct inode *inode2) | 937 | static void ocfs2_double_unlock(struct inode *inode1, struct inode *inode2) |
| 938 | { | 938 | { |
| 939 | ocfs2_meta_unlock(inode1, 1); | 939 | ocfs2_inode_unlock(inode1, 1); |
| 940 | 940 | ||
| 941 | if (inode1 != inode2) | 941 | if (inode1 != inode2) |
| 942 | ocfs2_meta_unlock(inode2, 1); | 942 | ocfs2_inode_unlock(inode2, 1); |
| 943 | } | 943 | } |
| 944 | 944 | ||
| 945 | static int ocfs2_rename(struct inode *old_dir, | 945 | static int ocfs2_rename(struct inode *old_dir, |
| @@ -1034,7 +1034,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
| 1034 | * won't have to concurrently downconvert the inode and the | 1034 | * won't have to concurrently downconvert the inode and the |
| 1035 | * dentry locks. | 1035 | * dentry locks. |
| 1036 | */ | 1036 | */ |
| 1037 | status = ocfs2_meta_lock(old_inode, &old_inode_bh, 1); | 1037 | status = ocfs2_inode_lock(old_inode, &old_inode_bh, 1); |
| 1038 | if (status < 0) { | 1038 | if (status < 0) { |
| 1039 | if (status != -ENOENT) | 1039 | if (status != -ENOENT) |
| 1040 | mlog_errno(status); | 1040 | mlog_errno(status); |
| @@ -1143,7 +1143,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
| 1143 | goto bail; | 1143 | goto bail; |
| 1144 | } | 1144 | } |
| 1145 | 1145 | ||
| 1146 | status = ocfs2_meta_lock(new_inode, &newfe_bh, 1); | 1146 | status = ocfs2_inode_lock(new_inode, &newfe_bh, 1); |
| 1147 | if (status < 0) { | 1147 | if (status < 0) { |
| 1148 | if (status != -ENOENT) | 1148 | if (status != -ENOENT) |
| 1149 | mlog_errno(status); | 1149 | mlog_errno(status); |
| @@ -1355,14 +1355,14 @@ bail: | |||
| 1355 | ocfs2_double_unlock(old_dir, new_dir); | 1355 | ocfs2_double_unlock(old_dir, new_dir); |
| 1356 | 1356 | ||
| 1357 | if (old_child_locked) | 1357 | if (old_child_locked) |
| 1358 | ocfs2_meta_unlock(old_inode, 1); | 1358 | ocfs2_inode_unlock(old_inode, 1); |
| 1359 | 1359 | ||
| 1360 | if (new_child_locked) | 1360 | if (new_child_locked) |
| 1361 | ocfs2_meta_unlock(new_inode, 1); | 1361 | ocfs2_inode_unlock(new_inode, 1); |
| 1362 | 1362 | ||
| 1363 | if (orphan_dir) { | 1363 | if (orphan_dir) { |
| 1364 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ | 1364 | /* This was locked for us in ocfs2_prepare_orphan_dir() */ |
| 1365 | ocfs2_meta_unlock(orphan_dir, 1); | 1365 | ocfs2_inode_unlock(orphan_dir, 1); |
| 1366 | mutex_unlock(&orphan_dir->i_mutex); | 1366 | mutex_unlock(&orphan_dir->i_mutex); |
| 1367 | iput(orphan_dir); | 1367 | iput(orphan_dir); |
| 1368 | } | 1368 | } |
| @@ -1530,7 +1530,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
| 1530 | credits = ocfs2_calc_symlink_credits(sb); | 1530 | credits = ocfs2_calc_symlink_credits(sb); |
| 1531 | 1531 | ||
| 1532 | /* lock the parent directory */ | 1532 | /* lock the parent directory */ |
| 1533 | status = ocfs2_meta_lock(dir, &parent_fe_bh, 1); | 1533 | status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); |
| 1534 | if (status < 0) { | 1534 | if (status < 0) { |
| 1535 | if (status != -ENOENT) | 1535 | if (status != -ENOENT) |
| 1536 | mlog_errno(status); | 1536 | mlog_errno(status); |
| @@ -1657,7 +1657,7 @@ bail: | |||
| 1657 | if (handle) | 1657 | if (handle) |
| 1658 | ocfs2_commit_trans(osb, handle); | 1658 | ocfs2_commit_trans(osb, handle); |
| 1659 | 1659 | ||
| 1660 | ocfs2_meta_unlock(dir, 1); | 1660 | ocfs2_inode_unlock(dir, 1); |
| 1661 | 1661 | ||
| 1662 | if (new_fe_bh) | 1662 | if (new_fe_bh) |
| 1663 | brelse(new_fe_bh); | 1663 | brelse(new_fe_bh); |
| @@ -1735,7 +1735,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
| 1735 | 1735 | ||
| 1736 | mutex_lock(&orphan_dir_inode->i_mutex); | 1736 | mutex_lock(&orphan_dir_inode->i_mutex); |
| 1737 | 1737 | ||
| 1738 | status = ocfs2_meta_lock(orphan_dir_inode, &orphan_dir_bh, 1); | 1738 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
| 1739 | if (status < 0) { | 1739 | if (status < 0) { |
| 1740 | mlog_errno(status); | 1740 | mlog_errno(status); |
| 1741 | goto leave; | 1741 | goto leave; |
| @@ -1745,7 +1745,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
| 1745 | orphan_dir_bh, name, | 1745 | orphan_dir_bh, name, |
| 1746 | OCFS2_ORPHAN_NAMELEN, de_bh); | 1746 | OCFS2_ORPHAN_NAMELEN, de_bh); |
| 1747 | if (status < 0) { | 1747 | if (status < 0) { |
| 1748 | ocfs2_meta_unlock(orphan_dir_inode, 1); | 1748 | ocfs2_inode_unlock(orphan_dir_inode, 1); |
| 1749 | 1749 | ||
| 1750 | mlog_errno(status); | 1750 | mlog_errno(status); |
| 1751 | goto leave; | 1751 | goto leave; |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 8f09f5235e3a..6df4dbf67d18 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
| @@ -114,7 +114,7 @@ void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac) | |||
| 114 | 114 | ||
| 115 | if (inode) { | 115 | if (inode) { |
| 116 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) | 116 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) |
| 117 | ocfs2_meta_unlock(inode, 1); | 117 | ocfs2_inode_unlock(inode, 1); |
| 118 | 118 | ||
| 119 | mutex_unlock(&inode->i_mutex); | 119 | mutex_unlock(&inode->i_mutex); |
| 120 | 120 | ||
| @@ -412,7 +412,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb, | |||
| 412 | 412 | ||
| 413 | mutex_lock(&alloc_inode->i_mutex); | 413 | mutex_lock(&alloc_inode->i_mutex); |
| 414 | 414 | ||
| 415 | status = ocfs2_meta_lock(alloc_inode, &bh, 1); | 415 | status = ocfs2_inode_lock(alloc_inode, &bh, 1); |
| 416 | if (status < 0) { | 416 | if (status < 0) { |
| 417 | mutex_unlock(&alloc_inode->i_mutex); | 417 | mutex_unlock(&alloc_inode->i_mutex); |
| 418 | iput(alloc_inode); | 418 | iput(alloc_inode); |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 064eba074f1e..7708df36e223 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
| @@ -964,7 +964,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 964 | goto bail; | 964 | goto bail; |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | status = ocfs2_meta_lock(inode, &bh, 0); | 967 | status = ocfs2_inode_lock(inode, &bh, 0); |
| 968 | if (status < 0) { | 968 | if (status < 0) { |
| 969 | mlog_errno(status); | 969 | mlog_errno(status); |
| 970 | goto bail; | 970 | goto bail; |
| @@ -988,7 +988,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 988 | 988 | ||
| 989 | brelse(bh); | 989 | brelse(bh); |
| 990 | 990 | ||
| 991 | ocfs2_meta_unlock(inode, 0); | 991 | ocfs2_inode_unlock(inode, 0); |
| 992 | status = 0; | 992 | status = 0; |
| 993 | bail: | 993 | bail: |
| 994 | if (inode) | 994 | if (inode) |
| @@ -1019,7 +1019,7 @@ static void ocfs2_inode_init_once(struct kmem_cache *cachep, void *data) | |||
| 1019 | oi->ip_clusters = 0; | 1019 | oi->ip_clusters = 0; |
| 1020 | 1020 | ||
| 1021 | ocfs2_lock_res_init_once(&oi->ip_rw_lockres); | 1021 | ocfs2_lock_res_init_once(&oi->ip_rw_lockres); |
| 1022 | ocfs2_lock_res_init_once(&oi->ip_meta_lockres); | 1022 | ocfs2_lock_res_init_once(&oi->ip_inode_lockres); |
| 1023 | ocfs2_lock_res_init_once(&oi->ip_open_lockres); | 1023 | ocfs2_lock_res_init_once(&oi->ip_open_lockres); |
| 1024 | 1024 | ||
| 1025 | ocfs2_metadata_cache_init(&oi->vfs_inode); | 1025 | ocfs2_metadata_cache_init(&oi->vfs_inode); |
