.. | .. |
---|
936 | 936 | return -ENOMEM; |
---|
937 | 937 | } |
---|
938 | 938 | |
---|
939 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 939 | + percpu_down_read(&file_rwsem); |
---|
940 | 940 | spin_lock(&ctx->flc_lock); |
---|
941 | 941 | if (request->fl_flags & FL_ACCESS) |
---|
942 | 942 | goto find_conflict; |
---|
.. | .. |
---|
977 | 977 | |
---|
978 | 978 | out: |
---|
979 | 979 | spin_unlock(&ctx->flc_lock); |
---|
980 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 980 | + percpu_up_read(&file_rwsem); |
---|
981 | 981 | if (new_fl) |
---|
982 | 982 | locks_free_lock(new_fl); |
---|
983 | 983 | locks_dispose_list(&dispose); |
---|
.. | .. |
---|
1015 | 1015 | new_fl2 = locks_alloc_lock(); |
---|
1016 | 1016 | } |
---|
1017 | 1017 | |
---|
1018 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1018 | + percpu_down_read(&file_rwsem); |
---|
1019 | 1019 | spin_lock(&ctx->flc_lock); |
---|
1020 | 1020 | /* |
---|
1021 | 1021 | * New lock request. Walk all POSIX locks and look for conflicts. If |
---|
.. | .. |
---|
1187 | 1187 | } |
---|
1188 | 1188 | out: |
---|
1189 | 1189 | spin_unlock(&ctx->flc_lock); |
---|
1190 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1190 | + percpu_up_read(&file_rwsem); |
---|
1191 | 1191 | /* |
---|
1192 | 1192 | * Free any unused locks. |
---|
1193 | 1193 | */ |
---|
.. | .. |
---|
1462 | 1462 | return error; |
---|
1463 | 1463 | } |
---|
1464 | 1464 | |
---|
1465 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1465 | + percpu_down_read(&file_rwsem); |
---|
1466 | 1466 | spin_lock(&ctx->flc_lock); |
---|
1467 | 1467 | |
---|
1468 | 1468 | time_out_leases(inode, &dispose); |
---|
.. | .. |
---|
1514 | 1514 | locks_insert_block(fl, new_fl); |
---|
1515 | 1515 | trace_break_lease_block(inode, new_fl); |
---|
1516 | 1516 | spin_unlock(&ctx->flc_lock); |
---|
1517 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1517 | + percpu_up_read(&file_rwsem); |
---|
1518 | 1518 | |
---|
1519 | 1519 | locks_dispose_list(&dispose); |
---|
1520 | 1520 | error = wait_event_interruptible_timeout(new_fl->fl_wait, |
---|
1521 | 1521 | !new_fl->fl_next, break_time); |
---|
1522 | 1522 | |
---|
1523 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1523 | + percpu_down_read(&file_rwsem); |
---|
1524 | 1524 | spin_lock(&ctx->flc_lock); |
---|
1525 | 1525 | trace_break_lease_unblock(inode, new_fl); |
---|
1526 | 1526 | locks_delete_block(new_fl); |
---|
.. | .. |
---|
1537 | 1537 | } |
---|
1538 | 1538 | out: |
---|
1539 | 1539 | spin_unlock(&ctx->flc_lock); |
---|
1540 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1540 | + percpu_up_read(&file_rwsem); |
---|
1541 | 1541 | locks_dispose_list(&dispose); |
---|
1542 | 1542 | locks_free_lock(new_fl); |
---|
1543 | 1543 | return error; |
---|
.. | .. |
---|
1609 | 1609 | |
---|
1610 | 1610 | ctx = smp_load_acquire(&inode->i_flctx); |
---|
1611 | 1611 | if (ctx && !list_empty_careful(&ctx->flc_lease)) { |
---|
1612 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1612 | + percpu_down_read(&file_rwsem); |
---|
1613 | 1613 | spin_lock(&ctx->flc_lock); |
---|
1614 | 1614 | time_out_leases(inode, &dispose); |
---|
1615 | 1615 | list_for_each_entry(fl, &ctx->flc_lease, fl_list) { |
---|
.. | .. |
---|
1619 | 1619 | break; |
---|
1620 | 1620 | } |
---|
1621 | 1621 | spin_unlock(&ctx->flc_lock); |
---|
1622 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1622 | + percpu_up_read(&file_rwsem); |
---|
1623 | 1623 | |
---|
1624 | 1624 | locks_dispose_list(&dispose); |
---|
1625 | 1625 | } |
---|
.. | .. |
---|
1693 | 1693 | return -EINVAL; |
---|
1694 | 1694 | } |
---|
1695 | 1695 | |
---|
1696 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1696 | + percpu_down_read(&file_rwsem); |
---|
1697 | 1697 | spin_lock(&ctx->flc_lock); |
---|
1698 | 1698 | time_out_leases(inode, &dispose); |
---|
1699 | 1699 | error = check_conflicting_open(dentry, arg, lease->fl_flags); |
---|
.. | .. |
---|
1764 | 1764 | lease->fl_lmops->lm_setup(lease, priv); |
---|
1765 | 1765 | out: |
---|
1766 | 1766 | spin_unlock(&ctx->flc_lock); |
---|
1767 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1767 | + percpu_up_read(&file_rwsem); |
---|
1768 | 1768 | locks_dispose_list(&dispose); |
---|
1769 | 1769 | if (is_deleg) |
---|
1770 | 1770 | inode_unlock(inode); |
---|
.. | .. |
---|
1787 | 1787 | return error; |
---|
1788 | 1788 | } |
---|
1789 | 1789 | |
---|
1790 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 1790 | + percpu_down_read(&file_rwsem); |
---|
1791 | 1791 | spin_lock(&ctx->flc_lock); |
---|
1792 | 1792 | list_for_each_entry(fl, &ctx->flc_lease, fl_list) { |
---|
1793 | 1793 | if (fl->fl_file == filp && |
---|
.. | .. |
---|
1800 | 1800 | if (victim) |
---|
1801 | 1801 | error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose); |
---|
1802 | 1802 | spin_unlock(&ctx->flc_lock); |
---|
1803 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 1803 | + percpu_up_read(&file_rwsem); |
---|
1804 | 1804 | locks_dispose_list(&dispose); |
---|
1805 | 1805 | return error; |
---|
1806 | 1806 | } |
---|
.. | .. |
---|
2531 | 2531 | if (list_empty(&ctx->flc_lease)) |
---|
2532 | 2532 | return; |
---|
2533 | 2533 | |
---|
2534 | | - percpu_down_read_preempt_disable(&file_rwsem); |
---|
| 2534 | + percpu_down_read(&file_rwsem); |
---|
2535 | 2535 | spin_lock(&ctx->flc_lock); |
---|
2536 | 2536 | list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list) |
---|
2537 | 2537 | if (filp == fl->fl_file) |
---|
2538 | 2538 | lease_modify(fl, F_UNLCK, &dispose); |
---|
2539 | 2539 | spin_unlock(&ctx->flc_lock); |
---|
2540 | | - percpu_up_read_preempt_enable(&file_rwsem); |
---|
| 2540 | + percpu_up_read(&file_rwsem); |
---|
2541 | 2541 | |
---|
2542 | 2542 | locks_dispose_list(&dispose); |
---|
2543 | 2543 | } |
---|