diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-08-01 13:40:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 10:54:06 -0700 |
commit | f6023962619f6a11e2921ba1d2e0cb9f829b1e72 (patch) | |
tree | eb663698d25163e6e69ce69f4b8c5c683980fb23 | |
parent | 2feba60ecd830b7865e14ffda86d99cdbb265add (diff) | |
download | lwn-f6023962619f6a11e2921ba1d2e0cb9f829b1e72.tar.gz lwn-f6023962619f6a11e2921ba1d2e0cb9f829b1e72.zip |
NFS: Fix a typo in include/linux/nfs_fs.h
commit 77a63f3d1e0a3e7ede8d10f569e8481b13ff47c5 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/nfs/write.c | 5 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 0a6c65a1f9d7..caf47fc45ca0 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1443,11 +1443,6 @@ out_mark_dirty: 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; diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index d2b552a6012f..1436eb5eb9cc 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -482,6 +482,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 |