From: Greg KH on
2.6.34-stable review patch. If anyone has any objections, please let us know.

------------------

From: Trond Myklebust <Trond.Myklebust(a)netapp.com>

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(a)elte.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust(a)netapp.com>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de>

---
fs/nfs/write.c | 5 -----
include/linux/nfs_fs.h | 6 ++++++
2 files changed, 6 insertions(+), 5 deletions(-)

--- 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;
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -482,6 +482,12 @@ extern int nfs_wb_page_cancel(struct ino
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/