diff options
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 0341c5700e34..6d6d28c0a72f 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -2149,8 +2149,13 @@ bad_swap_2: | |||
2149 | p->flags = 0; | 2149 | p->flags = 0; |
2150 | spin_unlock(&swap_lock); | 2150 | spin_unlock(&swap_lock); |
2151 | vfree(swap_map); | 2151 | vfree(swap_map); |
2152 | if (swap_file) | 2152 | if (swap_file) { |
2153 | if (did_down) { | ||
2154 | mutex_unlock(&inode->i_mutex); | ||
2155 | did_down = 0; | ||
2156 | } | ||
2153 | filp_close(swap_file, NULL); | 2157 | filp_close(swap_file, NULL); |
2158 | } | ||
2154 | out: | 2159 | out: |
2155 | if (page && !IS_ERR(page)) { | 2160 | if (page && !IS_ERR(page)) { |
2156 | kunmap(page); | 2161 | kunmap(page); |