GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / fs / ntfs / aops.h
blob533d409783ddc9cae2c498f6fa16ed4c400d1ef2
1 /**
2 * aops.h - Defines for NTFS kernel address space operations and page cache
3 * handling. Part of the Linux-NTFS project.
5 * Copyright (c) 2001-2004 Anton Altaparmakov
6 * Copyright (c) 2002 Richard Russon
8 * This program/include file is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program/include file is distributed in the hope that it will be
14 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program (in the main directory of the Linux-NTFS
20 * distribution in the file COPYING); if not, write to the Free Software
21 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef _LINUX_NTFS_AOPS_H
25 #define _LINUX_NTFS_AOPS_H
27 #include <linux/mm.h>
28 #include <linux/highmem.h>
29 #include <linux/pagemap.h>
30 #include <linux/fs.h>
32 #include "inode.h"
34 /**
35 * ntfs_unmap_page - release a page that was mapped using ntfs_map_page()
36 * @page: the page to release
38 * Unpin, unmap and release a page that was obtained from ntfs_map_page().
40 static inline void ntfs_unmap_page(struct page *page)
42 kunmap(page);
43 page_cache_release(page);
46 static inline struct page *ntfs_map_page(struct address_space *mapping,
47 unsigned long index)
49 struct page *page = read_mapping_page(mapping, index, NULL);
51 if (!IS_ERR(page)) {
52 kmap(page);
53 if (!PageError(page))
54 return page;
55 ntfs_unmap_page(page);
56 return ERR_PTR(-EIO);
58 return page;
61 #ifdef NTFS_RW
63 extern void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs);
65 #endif /* NTFS_RW */
67 #endif /* _LINUX_NTFS_AOPS_H */