Skip to content

Commit 77a63f3

Browse files
Trond Myklebusttorvalds
authored andcommitted
NFS: Fix a typo in include/linux/nfs_fs.h
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 <mingo@elte.hu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a63ecd8 commit 77a63f3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

fs/nfs/write.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,11 +1454,6 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
14541454
return ret;
14551455
}
14561456
#else
1457-
int nfs_commit_inode(struct inode *inode, int how)
1458-
{
1459-
return 0;
1460-
}
1461-
14621457
static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)
14631458
{
14641459
return 0;

include/linux/nfs_fs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,12 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
496496
extern int nfs_commit_inode(struct inode *, int);
497497
extern struct nfs_write_data *nfs_commitdata_alloc(void);
498498
extern void nfs_commit_free(struct nfs_write_data *wdata);
499+
#else
500+
static inline int
501+
nfs_commit_inode(struct inode *inode, int how)
502+
{
503+
return 0;
504+
}
499505
#endif
500506

501507
static inline int

0 commit comments

Comments
 (0)