diff options
| -rw-r--r-- | fs/exofs/inode.c | 17 | ||||
| -rw-r--r-- | fs/exofs/pnfs.h | 10 |
2 files changed, 18 insertions, 9 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 698a8636d39c..2afbcebeda71 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
| @@ -738,13 +738,28 @@ static int exofs_write_begin_export(struct file *file, | |||
| 738 | fsdata); | 738 | fsdata); |
| 739 | } | 739 | } |
| 740 | 740 | ||
| 741 | static int exofs_write_end(struct file *file, struct address_space *mapping, | ||
| 742 | loff_t pos, unsigned len, unsigned copied, | ||
| 743 | struct page *page, void *fsdata) | ||
| 744 | { | ||
| 745 | struct inode *inode = mapping->host; | ||
| 746 | /* According to comment in simple_write_end i_mutex is held */ | ||
| 747 | loff_t i_size = inode->i_size; | ||
| 748 | int ret; | ||
| 749 | |||
| 750 | ret = simple_write_end(file, mapping,pos, len, copied, page, fsdata); | ||
| 751 | if (i_size != inode->i_size) | ||
| 752 | mark_inode_dirty(inode); | ||
| 753 | return ret; | ||
| 754 | } | ||
| 755 | |||
| 741 | const struct address_space_operations exofs_aops = { | 756 | const struct address_space_operations exofs_aops = { |
| 742 | .readpage = exofs_readpage, | 757 | .readpage = exofs_readpage, |
| 743 | .readpages = exofs_readpages, | 758 | .readpages = exofs_readpages, |
| 744 | .writepage = exofs_writepage, | 759 | .writepage = exofs_writepage, |
| 745 | .writepages = exofs_writepages, | 760 | .writepages = exofs_writepages, |
| 746 | .write_begin = exofs_write_begin_export, | 761 | .write_begin = exofs_write_begin_export, |
| 747 | .write_end = simple_write_end, | 762 | .write_end = exofs_write_end, |
| 748 | }; | 763 | }; |
| 749 | 764 | ||
| 750 | /****************************************************************************** | 765 | /****************************************************************************** |
diff --git a/fs/exofs/pnfs.h b/fs/exofs/pnfs.h index 423033addd1f..c52e9888b8ab 100644 --- a/fs/exofs/pnfs.h +++ b/fs/exofs/pnfs.h | |||
| @@ -15,13 +15,7 @@ | |||
| 15 | #ifndef __EXOFS_PNFS_H__ | 15 | #ifndef __EXOFS_PNFS_H__ |
| 16 | #define __EXOFS_PNFS_H__ | 16 | #define __EXOFS_PNFS_H__ |
| 17 | 17 | ||
| 18 | #if defined(CONFIG_PNFS) | 18 | #if ! defined(__PNFS_OSD_XDR_H__) |
| 19 | |||
| 20 | |||
| 21 | /* FIXME: move this file to: linux/exportfs/pnfs_osd_xdr.h */ | ||
| 22 | #include "../nfs/objlayout/pnfs_osd_xdr.h" | ||
| 23 | |||
| 24 | #else /* defined(CONFIG_PNFS) */ | ||
| 25 | 19 | ||
| 26 | enum pnfs_iomode { | 20 | enum pnfs_iomode { |
| 27 | IOMODE_READ = 1, | 21 | IOMODE_READ = 1, |
| @@ -46,6 +40,6 @@ struct pnfs_osd_data_map { | |||
| 46 | u32 odm_raid_algorithm; | 40 | u32 odm_raid_algorithm; |
| 47 | }; | 41 | }; |
| 48 | 42 | ||
| 49 | #endif /* else defined(CONFIG_PNFS) */ | 43 | #endif /* ! defined(__PNFS_OSD_XDR_H__) */ |
| 50 | 44 | ||
| 51 | #endif /* __EXOFS_PNFS_H__ */ | 45 | #endif /* __EXOFS_PNFS_H__ */ |
