Change all the usages of file->f_mapping in ext3_*write_end() functions to use
the mapping argument directly. This has two consequences:
(*) Consistency. Without this patch sometimes one is used and sometimes the
other is.
(*) A NULL file pointer can be passed. This feature is then made use of by
the generic hook in the next patch, which is used by CacheFiles to write
pages to a file without setting up a file struct.
Signed-off-by: David Howells <dhowells@redhat.com>
---
fs/ext3/inode.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 9b162cd..bc918d3 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1227,7 +1227,7 @@ static int ext3_generic_write_end(struct file *file,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
- struct inode *inode = file->f_mapping->host;
+ struct inode *inode = mapping->host;
copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);
@@ -1252,7 +1252,7 @@ static int ext3_ordered_write_end(struct file *file,
struct page *page, void *fsdata)
{
handle_t *handle = ext3_journal_current_handle();
- struct inode *inode = file->f_mapping->host;
+ struct inode *inode = mapping->host;
unsigned from, to;
int ret = 0, ret2;
@@ -1293,7 +1293,7 @@ static int ext3_writeback_write_end(struct file *file,
struct page *page, void *fsdata)
{
handle_t *handle = ext3_journal_current_handle();
- struct inode *inode = file->f_mapping->host;
+ struct inode *inode = mapping->host;
int ret = 0, ret2;
loff_t new_i_size;
--
| David Miller | [GIT]: Networking |
| Fred . | Please add ZFS support (from GPL sources) |
| Rusty Russell | Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to ma... |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Neng-Yu Tu (Tony Tu) | GTA02 GPS rework for SD card interference issue |
| nickd | Re: My experience with the Freerunner |
| Flemming Richter Mikkelsen | Re: QVGA V/s VGA for GTA03 (was something about yummy CPU-GPU combos!) |
| cedric cellier | Re: comparing Apples and Oranges $199 iPhone Freerunner GTA02 |
git: | |
| Toby White | Using Filemerge.app as a git-diff viewer |
| Nicolas Pitre | Re: Cleaning up git user-interface warts |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Abdelrazak Younes | Git-windows and git-svn? |
| Kevin Stam | Re: Code signing in OpenBSD |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| christian johansson | openbsd on a geode |
| Karel Kulhavy | lookup option in /etc/resolv.conf ignored |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 20 minutes ago | Linux kernel |
| SATA 2 size problems | 37 minutes ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 13 hours ago | Linux kernel |
| get_user_pages failure | 14 hours ago | Linux kernel |
| Reading linux kernel | 15 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 21 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
