mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
gfs2: remove the unused gfs2_stuffed_write_end function
This function was overlooked when the write_begin and write_end address space operations were removed as part of gfs2's iomap conversion. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
f3915f83e8
commit
e0ec0a6ba6
@ -685,47 +685,6 @@ out:
|
||||
gfs2_trans_end(sdp);
|
||||
}
|
||||
|
||||
/**
|
||||
* gfs2_stuffed_write_end - Write end for stuffed files
|
||||
* @inode: The inode
|
||||
* @dibh: The buffer_head containing the on-disk inode
|
||||
* @pos: The file position
|
||||
* @copied: How much was actually copied by the VFS
|
||||
* @page: The page
|
||||
*
|
||||
* This copies the data from the page into the inode block after
|
||||
* the inode data structure itself.
|
||||
*
|
||||
* Returns: copied bytes or errno
|
||||
*/
|
||||
int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
|
||||
loff_t pos, unsigned copied,
|
||||
struct page *page)
|
||||
{
|
||||
struct gfs2_inode *ip = GFS2_I(inode);
|
||||
u64 to = pos + copied;
|
||||
void *kaddr;
|
||||
unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode);
|
||||
|
||||
BUG_ON(pos + copied > gfs2_max_stuffed_size(ip));
|
||||
|
||||
kaddr = kmap_atomic(page);
|
||||
memcpy(buf + pos, kaddr + pos, copied);
|
||||
flush_dcache_page(page);
|
||||
kunmap_atomic(kaddr);
|
||||
|
||||
WARN_ON(!PageUptodate(page));
|
||||
unlock_page(page);
|
||||
put_page(page);
|
||||
|
||||
if (copied) {
|
||||
if (inode->i_size < to)
|
||||
i_size_write(inode, to);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
return copied;
|
||||
}
|
||||
|
||||
/**
|
||||
* jdata_set_page_dirty - Page dirtying function
|
||||
* @page: The page to dirty
|
||||
|
@ -9,9 +9,6 @@
|
||||
#include "incore.h"
|
||||
|
||||
extern int stuffed_readpage(struct gfs2_inode *ip, struct page *page);
|
||||
extern int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
|
||||
loff_t pos, unsigned copied,
|
||||
struct page *page);
|
||||
extern void adjust_fs_space(struct inode *inode);
|
||||
extern void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page,
|
||||
unsigned int from, unsigned int len);
|
||||
|
Loading…
Reference in New Issue
Block a user