mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
aa0b42b7b4
Fix many W=1 kernel-doc warnings in fs/ntfs/: fs/ntfs/aops.c:30: warning: Incorrect use of kernel-doc format: * ntfs_end_buffer_async_read - async io completion for reading attributes fs/ntfs/aops.c:46: warning: expecting prototype for aops.c(). Prototype was for ntfs_end_buffer_async_read() instead fs/ntfs/aops.c:1655: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_normal_aops = ' fs/ntfs/aops.c:1670: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_compressed_aops = ' fs/ntfs/aops.c:1685: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_mst_aops = ' fs/ntfs/compress.c:22: warning: Incorrect use of kernel-doc format: * ntfs_compression_constants - enum of constants used in the compression code fs/ntfs/compress.c:24: warning: cannot understand function prototype: 'typedef enum ' fs/ntfs/compress.c:47: warning: cannot understand function prototype: 'u8 *ntfs_compression_buffer; ' fs/ntfs/compress.c:52: warning: expecting prototype for ntfs_cb_lock(). Prototype was for DEFINE_SPINLOCK() instead fs/ntfs/dir.c:21: warning: Incorrect use of kernel-doc format: * The little endian Unicode string $I30 as a global constant. fs/ntfs/dir.c:23: warning: cannot understand function prototype: 'ntfschar I30[5] = ' fs/ntfs/inode.c:31: warning: Incorrect use of kernel-doc format: * ntfs_test_inode - compare two (possibly fake) inodes for equality fs/ntfs/inode.c:47: warning: expecting prototype for inode.c(). Prototype was for ntfs_test_inode() instead fs/ntfs/inode.c:2956: warning: expecting prototype for ntfs_write_inode(). Prototype was for __ntfs_write_inode() instead fs/ntfs/mft.c:24: warning: expecting prototype for mft.c - NTFS kernel mft record operations. Part of the Linux(). Prototype was for MAX_BHS() instead fs/ntfs/namei.c:263: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Inode operations for directories. fs/ntfs/namei.c:368: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Export operations allowing NFS exporting of mounted NTFS partitions. fs/ntfs/runlist.c:16: warning: Incorrect use of kernel-doc format: * ntfs_rl_mm - runlist memmove fs/ntfs/runlist.c:22: warning: expecting prototype for runlist.c - NTFS runlist handling code. Part of the Linux(). Prototype was for ntfs_rl_mm() instead fs/ntfs/super.c:61: warning: missing initial short description on line: * simple_getbool - fs/ntfs/super.c:2661: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * The complete super operations. Link: https://lkml.kernel.org/r/20230109010041.21442-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Anton Altaparmakov <anton@tuxera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
89 lines
3.1 KiB
C
89 lines
3.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* aops.h - Defines for NTFS kernel address space operations and page cache
|
|
* handling. Part of the Linux-NTFS project.
|
|
*
|
|
* Copyright (c) 2001-2004 Anton Altaparmakov
|
|
* Copyright (c) 2002 Richard Russon
|
|
*/
|
|
|
|
#ifndef _LINUX_NTFS_AOPS_H
|
|
#define _LINUX_NTFS_AOPS_H
|
|
|
|
#include <linux/mm.h>
|
|
#include <linux/highmem.h>
|
|
#include <linux/pagemap.h>
|
|
#include <linux/fs.h>
|
|
|
|
#include "inode.h"
|
|
|
|
/**
|
|
* ntfs_unmap_page - release a page that was mapped using ntfs_map_page()
|
|
* @page: the page to release
|
|
*
|
|
* Unpin, unmap and release a page that was obtained from ntfs_map_page().
|
|
*/
|
|
static inline void ntfs_unmap_page(struct page *page)
|
|
{
|
|
kunmap(page);
|
|
put_page(page);
|
|
}
|
|
|
|
/**
|
|
* ntfs_map_page - map a page into accessible memory, reading it if necessary
|
|
* @mapping: address space for which to obtain the page
|
|
* @index: index into the page cache for @mapping of the page to map
|
|
*
|
|
* Read a page from the page cache of the address space @mapping at position
|
|
* @index, where @index is in units of PAGE_SIZE, and not in bytes.
|
|
*
|
|
* If the page is not in memory it is loaded from disk first using the
|
|
* read_folio method defined in the address space operations of @mapping
|
|
* and the page is added to the page cache of @mapping in the process.
|
|
*
|
|
* If the page belongs to an mst protected attribute and it is marked as such
|
|
* in its ntfs inode (NInoMstProtected()) the mst fixups are applied but no
|
|
* error checking is performed. This means the caller has to verify whether
|
|
* the ntfs record(s) contained in the page are valid or not using one of the
|
|
* ntfs_is_XXXX_record{,p}() macros, where XXXX is the record type you are
|
|
* expecting to see. (For details of the macros, see fs/ntfs/layout.h.)
|
|
*
|
|
* If the page is in high memory it is mapped into memory directly addressible
|
|
* by the kernel.
|
|
*
|
|
* Finally the page count is incremented, thus pinning the page into place.
|
|
*
|
|
* The above means that page_address(page) can be used on all pages obtained
|
|
* with ntfs_map_page() to get the kernel virtual address of the page.
|
|
*
|
|
* When finished with the page, the caller has to call ntfs_unmap_page() to
|
|
* unpin, unmap and release the page.
|
|
*
|
|
* Note this does not grant exclusive access. If such is desired, the caller
|
|
* must provide it independently of the ntfs_{un}map_page() calls by using
|
|
* a {rw_}semaphore or other means of serialization. A spin lock cannot be
|
|
* used as ntfs_map_page() can block.
|
|
*
|
|
* The unlocked and uptodate page is returned on success or an encoded error
|
|
* on failure. Caller has to test for error using the IS_ERR() macro on the
|
|
* return value. If that evaluates to 'true', the negative error code can be
|
|
* obtained using PTR_ERR() on the return value of ntfs_map_page().
|
|
*/
|
|
static inline struct page *ntfs_map_page(struct address_space *mapping,
|
|
unsigned long index)
|
|
{
|
|
struct page *page = read_mapping_page(mapping, index, NULL);
|
|
|
|
if (!IS_ERR(page))
|
|
kmap(page);
|
|
return page;
|
|
}
|
|
|
|
#ifdef NTFS_RW
|
|
|
|
extern void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs);
|
|
|
|
#endif /* NTFS_RW */
|
|
|
|
#endif /* _LINUX_NTFS_AOPS_H */
|