Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27496a8c authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] gfp_t: fs/*



 - ->releasepage() annotated (s/int/gfp_t), instances updated
 - missing gfp_t in fs/* added
 - fixed misannotation from the original sweep caught by bitwise checks:
   XFS used __nocast both for gfp_t and for flags used by XFS allocator.
   The latter left with unsigned int __nocast; we might want to add a
   different type for those but for now let's leave them alone.  That,
   BTW, is a case when __nocast use had been actively confusing - it had
   been used in the same code for two different and similar types, with
   no way to catch misuses.  Switch of gfp_t to bitwise had caught that
   immediately...

One tricky bit is left alone to be dealt with later - mapping->flags is
a mix of gfp_t and error indications.  Left alone for now.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7d877f3b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -29,7 +29,7 @@ static int afs_file_release(struct inode *inode, struct file *file);


static int afs_file_readpage(struct file *file, struct page *page);
static int afs_file_readpage(struct file *file, struct page *page);
static int afs_file_invalidatepage(struct page *page, unsigned long offset);
static int afs_file_invalidatepage(struct page *page, unsigned long offset);
static int afs_file_releasepage(struct page *page, int gfp_flags);
static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);


static ssize_t afs_file_write(struct file *file, const char __user *buf,
static ssize_t afs_file_write(struct file *file, const char __user *buf,
			      size_t size, loff_t *off);
			      size_t size, loff_t *off);
@@ -279,7 +279,7 @@ static int afs_file_invalidatepage(struct page *page, unsigned long offset)
/*
/*
 * release a page and cleanup its private data
 * release a page and cleanup its private data
 */
 */
static int afs_file_releasepage(struct page *page, int gfp_flags)
static int afs_file_releasepage(struct page *page, gfp_t gfp_flags)
{
{
	struct cachefs_page *pageio;
	struct cachefs_page *pageio;


+2 −2
Original line number Original line Diff line number Diff line
@@ -778,7 +778,7 @@ static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err)




static struct bio *__bio_map_kern(request_queue_t *q, void *data,
static struct bio *__bio_map_kern(request_queue_t *q, void *data,
				  unsigned int len, unsigned int gfp_mask)
				  unsigned int len, gfp_t gfp_mask)
{
{
	unsigned long kaddr = (unsigned long)data;
	unsigned long kaddr = (unsigned long)data;
	unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
	unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -825,7 +825,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data,
 *	device. Returns an error pointer in case of error.
 *	device. Returns an error pointer in case of error.
 */
 */
struct bio *bio_map_kern(request_queue_t *q, void *data, unsigned int len,
struct bio *bio_map_kern(request_queue_t *q, void *data, unsigned int len,
			 unsigned int gfp_mask)
			 gfp_t gfp_mask)
{
{
	struct bio *bio;
	struct bio *bio;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1571,7 +1571,7 @@ static inline void discard_buffer(struct buffer_head * bh)
 *
 *
 * NOTE: @gfp_mask may go away, and this function may become non-blocking.
 * NOTE: @gfp_mask may go away, and this function may become non-blocking.
 */
 */
int try_to_release_page(struct page *page, int gfp_mask)
int try_to_release_page(struct page *page, gfp_t gfp_mask)
{
{
	struct address_space * const mapping = page->mapping;
	struct address_space * const mapping = page->mapping;


+1 −1
Original line number Original line Diff line number Diff line
@@ -689,7 +689,7 @@ void shrink_dcache_anon(struct hlist_head *head)
 *
 *
 * In this case we return -1 to tell the caller that we baled.
 * In this case we return -1 to tell the caller that we baled.
 */
 */
static int shrink_dcache_memory(int nr, unsigned int gfp_mask)
static int shrink_dcache_memory(int nr, gfp_t gfp_mask)
{
{
	if (nr) {
	if (nr) {
		if (!(gfp_mask & __GFP_FS))
		if (!(gfp_mask & __GFP_FS))
+1 −1
Original line number Original line Diff line number Diff line
@@ -500,7 +500,7 @@ static void prune_dqcache(int count)
 * more memory
 * more memory
 */
 */


static int shrink_dqcache_memory(int nr, unsigned int gfp_mask)
static int shrink_dqcache_memory(int nr, gfp_t gfp_mask)
{
{
	if (nr) {
	if (nr) {
		spin_lock(&dq_list_lock);
		spin_lock(&dq_list_lock);
Loading