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

Commit 516cdb68 authored by Kai Bankett's avatar Kai Bankett Committed by Al Viro
Browse files

qnx4fs: small cleanup



Small qnx4 cleanup patch.
- removes .writepage, .write_begin and .write_end (+callback functions)
- removes '.' path checking in namei.c (handled on upper layers)

Signed-off-by: default avatarKai Bankett <chaosman@ontika.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 32991ab3
Loading
Loading
Loading
Loading
+0 −27
Original line number Original line Diff line number Diff line
@@ -286,44 +286,17 @@ static void qnx4_put_super(struct super_block *sb)
	return;
	return;
}
}


static int qnx4_writepage(struct page *page, struct writeback_control *wbc)
{
	return block_write_full_page(page,qnx4_get_block, wbc);
}

static int qnx4_readpage(struct file *file, struct page *page)
static int qnx4_readpage(struct file *file, struct page *page)
{
{
	return block_read_full_page(page,qnx4_get_block);
	return block_read_full_page(page,qnx4_get_block);
}
}


static int qnx4_write_begin(struct file *file, struct address_space *mapping,
			loff_t pos, unsigned len, unsigned flags,
			struct page **pagep, void **fsdata)
{
	struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host);
	int ret;

	*pagep = NULL;
	ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
				qnx4_get_block,
				&qnx4_inode->mmu_private);
	if (unlikely(ret)) {
		loff_t isize = mapping->host->i_size;
		if (pos + len > isize)
			vmtruncate(mapping->host, isize);
	}

	return ret;
}
static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
{
{
	return generic_block_bmap(mapping,block,qnx4_get_block);
	return generic_block_bmap(mapping,block,qnx4_get_block);
}
}
static const struct address_space_operations qnx4_aops = {
static const struct address_space_operations qnx4_aops = {
	.readpage	= qnx4_readpage,
	.readpage	= qnx4_readpage,
	.writepage	= qnx4_writepage,
	.write_begin	= qnx4_write_begin,
	.write_end	= generic_write_end,
	.bmap		= qnx4_bmap
	.bmap		= qnx4_bmap
};
};


+0 −4
Original line number Original line Diff line number Diff line
@@ -39,10 +39,6 @@ static int qnx4_match(int len, const char *name,
	} else {
	} else {
		namelen = QNX4_SHORT_NAME_MAX;
		namelen = QNX4_SHORT_NAME_MAX;
	}
	}
	/* "" means "." ---> so paths like "/usr/lib//libc.a" work */
	if (!len && (de->di_fname[0] == '.') && (de->di_fname[1] == '\0')) {
		return 1;
	}
	thislen = strlen( de->di_fname );
	thislen = strlen( de->di_fname );
	if ( thislen > namelen )
	if ( thislen > namelen )
		thislen = namelen;
		thislen = namelen;