From c25ec8f5684cb3c5dde6a67c1bbc33a449eefbe2 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 30 Jan 2006 08:57:31 +0000 Subject: [GFS2] Export file_read_actor Export file_read_actor so that it can be used from modules since functions which take this function as an argument are already exported. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index 44da3d47699..7624c26fcea 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -981,6 +981,7 @@ success: desc->arg.buf += size; return size; } +EXPORT_SYMBOL(file_read_actor); /* * This is the "read()" routine for all filesystems -- cgit v1.2.3 From bf9f424d9acf461fabcb0e9f47b356e08186d91f Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 21 Jun 2006 11:54:43 -0400 Subject: [GFS2] Make file_read_actor export _GPL Make file_read_actor export a _GPL export. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index 82c448898d0..a02a0b2c986 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1044,7 +1044,7 @@ success: desc->arg.buf += size; return size; } -EXPORT_SYMBOL(file_read_actor); +EXPORT_SYMBOL_GPL(file_read_actor); /* * This is the "read()" routine for all filesystems -- cgit v1.2.3 From a9e5f4d0780ec9cda7a70b08294d7718431b62a1 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 25 Jul 2006 17:24:12 -0400 Subject: [GFS2] Alter direct I/O path As per comments received, alter the GFS2 direct I/O path so that it uses the standard read functions "out of the box". Needs a small change to one of the VFS functions. This reduces the size of the code quite a lot and also removes the need for one new export. Some more work remains to be done, but this is the bones of the thing. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index b9c91ab7f0f..a92d690b3ae 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1122,7 +1122,6 @@ success: desc->arg.buf += size; return size; } -EXPORT_SYMBOL_GPL(file_read_actor); /** * __generic_file_aio_read - generic filesystem read routine @@ -1184,7 +1183,8 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, *ppos = pos + retval; } file_accessed(filp); - goto out; + if (retval != 0) + goto out; } retval = 0; -- cgit v1.2.3 From 0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 27 Sep 2006 14:45:07 -0400 Subject: [GFS2] Fix direct i/o logic in filemap.c We shouldn't mark the file accessed in the case that it wasn't accessed. Signed-off-by: Steven Whitehouse --- mm/filemap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index d9bbea1e87d..91a741ddd49 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1180,9 +1180,10 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, if (retval > 0) *ppos = pos + retval; } - file_accessed(filp); - if (retval != 0) + if (likely(retval != 0)) { + file_accessed(flip); goto out; + } } retval = 0; -- cgit v1.2.3 From 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 27 Sep 2006 14:52:48 -0400 Subject: [GFS2] Fix typo in last patch Signed-off-by: Steven Whitehouse --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index 91a741ddd49..3195806d78e 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1181,7 +1181,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, *ppos = pos + retval; } if (likely(retval != 0)) { - file_accessed(flip); + file_accessed(filp); goto out; } } -- cgit v1.2.3