aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/aops.c')
-rw-r--r--fs/ntfs/aops.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 7e361da770b3..580412d330cb 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -22,6 +22,7 @@
22 */ 22 */
23 23
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/fs.h>
25#include <linux/mm.h> 26#include <linux/mm.h>
26#include <linux/pagemap.h> 27#include <linux/pagemap.h>
27#include <linux/swap.h> 28#include <linux/swap.h>
@@ -1277,18 +1278,18 @@ unm_done:
1277 1278
1278 tni = locked_nis[nr_locked_nis]; 1279 tni = locked_nis[nr_locked_nis];
1279 /* Get the base inode. */ 1280 /* Get the base inode. */
1280 down(&tni->extent_lock); 1281 mutex_lock(&tni->extent_lock);
1281 if (tni->nr_extents >= 0) 1282 if (tni->nr_extents >= 0)
1282 base_tni = tni; 1283 base_tni = tni;
1283 else { 1284 else {
1284 base_tni = tni->ext.base_ntfs_ino; 1285 base_tni = tni->ext.base_ntfs_ino;
1285 BUG_ON(!base_tni); 1286 BUG_ON(!base_tni);
1286 } 1287 }
1287 up(&tni->extent_lock); 1288 mutex_unlock(&tni->extent_lock);
1288 ntfs_debug("Unlocking %s inode 0x%lx.", 1289 ntfs_debug("Unlocking %s inode 0x%lx.",
1289 tni == base_tni ? "base" : "extent", 1290 tni == base_tni ? "base" : "extent",
1290 tni->mft_no); 1291 tni->mft_no);
1291 up(&tni->mrec_lock); 1292 mutex_unlock(&tni->mrec_lock);
1292 atomic_dec(&tni->count); 1293 atomic_dec(&tni->count);
1293 iput(VFS_I(base_tni)); 1294 iput(VFS_I(base_tni));
1294 } 1295 }
@@ -1529,7 +1530,6 @@ err_out:
1529 "error %i.", err); 1530 "error %i.", err);
1530 SetPageError(page); 1531 SetPageError(page);
1531 NVolSetErrors(ni->vol); 1532 NVolSetErrors(ni->vol);
1532 make_bad_inode(vi);
1533 } 1533 }
1534 unlock_page(page); 1534 unlock_page(page);
1535 if (ctx) 1535 if (ctx)
@@ -1551,6 +1551,9 @@ struct address_space_operations ntfs_aops = {
1551#ifdef NTFS_RW 1551#ifdef NTFS_RW
1552 .writepage = ntfs_writepage, /* Write dirty page to disk. */ 1552 .writepage = ntfs_writepage, /* Write dirty page to disk. */
1553#endif /* NTFS_RW */ 1553#endif /* NTFS_RW */
1554 .migratepage = buffer_migrate_page, /* Move a page cache page from
1555 one physical page to an
1556 other. */
1554}; 1557};
1555 1558
1556/** 1559/**
@@ -1567,6 +1570,9 @@ struct address_space_operations ntfs_mst_aops = {
1567 without touching the buffers 1570 without touching the buffers
1568 belonging to the page. */ 1571 belonging to the page. */
1569#endif /* NTFS_RW */ 1572#endif /* NTFS_RW */
1573 .migratepage = buffer_migrate_page, /* Move a page cache page from
1574 one physical page to an
1575 other. */
1570}; 1576};
1571 1577
1572#ifdef NTFS_RW 1578#ifdef NTFS_RW