]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: Fix a typo in include/linux/nfs_fs.h
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 1 Aug 2010 17:40:40 +0000 (13:40 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 17:54:06 +0000 (10:54 -0700)
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>
fs/nfs/write.c
include/linux/nfs_fs.h

index 0a6c65a1f9d786c6116c2698cde922ae887e8dd5..caf47fc45ca0da5de5a31db3b7b5d16ce31c02e4 100644 (file)
@@ -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;
index d2b552a6012f3776538d551d26259866311c28c6..1436eb5eb9cca8b841aa1b059211fdbab2870ef8 100644 (file)
@@ -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