Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6846
b: refs/heads/master
c: 4cd3bb1
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 5, 2005
1 parent e49c491 commit 9aa2883
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2244ec2efa4ee1edf391d0001d314933e2b2974
refs/heads/master: 4cd3bb10ff0b21b77b5a4cd13b4bd36694e054c4
4 changes: 2 additions & 2 deletions trunk/mm/swapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile)
swap_list_unlock();
goto out_dput;
}
destroy_swap_extents(p);
down(&swapon_sem);
swap_list_lock();
drain_mmlist();
Expand All @@ -1139,7 +1140,6 @@ asmlinkage long sys_swapoff(const char __user * specialfile)
swap_map = p->swap_map;
p->swap_map = NULL;
p->flags = 0;
destroy_swap_extents(p);
swap_device_unlock(p);
swap_list_unlock();
up(&swapon_sem);
Expand Down Expand Up @@ -1531,6 +1531,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
set_blocksize(bdev, p->old_block_size);
bd_release(bdev);
}
destroy_swap_extents(p);
bad_swap_2:
swap_list_lock();
swap_map = p->swap_map;
Expand All @@ -1540,7 +1541,6 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
if (!(swap_flags & SWAP_FLAG_PREFER))
++least_priority;
swap_list_unlock();
destroy_swap_extents(p);
vfree(swap_map);
if (swap_file)
filp_close(swap_file, NULL);
Expand Down

0 comments on commit 9aa2883

Please sign in to comment.