Skip to content

Commit

Permalink
ocfs2: clean up unused 'page' parameter in ocfs2_write_end_nolock()
Browse files Browse the repository at this point in the history
'page' parameter in ocfs2_write_end_nolock() is never used.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jun Piao <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JunPiaoHW authored and torvalds committed Dec 13, 2016
1 parent 28bb5ef commit 07f38d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 3 additions & 4 deletions fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,8 +1950,7 @@ static void ocfs2_write_end_inline(struct inode *inode, loff_t pos,
}

int ocfs2_write_end_nolock(struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
loff_t pos, unsigned len, unsigned copied, void *fsdata)
{
int i, ret;
unsigned from, to, start = pos & (PAGE_SIZE - 1);
Expand Down Expand Up @@ -2064,7 +2063,7 @@ static int ocfs2_write_end(struct file *file, struct address_space *mapping,
int ret;
struct inode *inode = mapping->host;

ret = ocfs2_write_end_nolock(mapping, pos, len, copied, page, fsdata);
ret = ocfs2_write_end_nolock(mapping, pos, len, copied, fsdata);

up_write(&OCFS2_I(inode)->ip_alloc_sem);
ocfs2_inode_unlock(inode, 1);
Expand Down Expand Up @@ -2241,7 +2240,7 @@ static int ocfs2_dio_get_block(struct inode *inode, sector_t iblock,
dwc->dw_zero_count++;
}

ret = ocfs2_write_end_nolock(inode->i_mapping, pos, len, len, NULL, wc);
ret = ocfs2_write_end_nolock(inode->i_mapping, pos, len, len, wc);
BUG_ON(ret != len);
ret = 0;
unlock:
Expand Down
3 changes: 1 addition & 2 deletions fs/ocfs2/aops.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ int walk_page_buffers( handle_t *handle,
struct buffer_head *bh));

int ocfs2_write_end_nolock(struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata);
loff_t pos, unsigned len, unsigned copied, void *fsdata);

typedef enum {
OCFS2_WRITE_BUFFER = 0,
Expand Down
3 changes: 1 addition & 2 deletions fs/ocfs2/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ static int __ocfs2_page_mkwrite(struct file *file, struct buffer_head *di_bh,
ret = VM_FAULT_NOPAGE;
goto out;
}
ret = ocfs2_write_end_nolock(mapping, pos, len, len, locked_page,
fsdata);
ret = ocfs2_write_end_nolock(mapping, pos, len, len, fsdata);
BUG_ON(ret != len);
ret = VM_FAULT_LOCKED;
out:
Expand Down

0 comments on commit 07f38d9

Please sign in to comment.