Skip to content

Commit

Permalink
NFS: Fix a typo in include/linux/nfs_fs.h
Browse files Browse the repository at this point in the history
nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.

Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.

Reported-and-tested-by: Ingo Molnar <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Trond Myklebust authored and torvalds committed Aug 1, 2010
1 parent a63ecd8 commit 77a63f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,11 +1454,6 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
return ret;
}
#else
int nfs_commit_inode(struct inode *inode, int how)
{
return 0;
}

static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)
{
return 0;
Expand Down
6 changes: 6 additions & 0 deletions include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
extern int nfs_commit_inode(struct inode *, int);
extern struct nfs_write_data *nfs_commitdata_alloc(void);
extern void nfs_commit_free(struct nfs_write_data *wdata);
#else
static inline int
nfs_commit_inode(struct inode *inode, int how)
{
return 0;
}
#endif

static inline int
Expand Down

0 comments on commit 77a63f3

Please sign in to comment.