diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-06 01:41:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-06 01:41:07 -0800 |
commit | c6f7afaeeda5b3c42ea8d7b27e197d223a04675e (patch) | |
tree | 9a86bc9593ef8219bfc469e277d1b327f38aed9e /fs | |
parent | 34e2fde8a496cf9d7c184ef12eafd3dd854586f1 (diff) | |
parent | efd124b999fb4d426b30675f1684521af0872789 (diff) | |
download | linux-c6f7afaeeda5b3c42ea8d7b27e197d223a04675e.tar.gz linux-c6f7afaeeda5b3c42ea8d7b27e197d223a04675e.tar.bz2 linux-c6f7afaeeda5b3c42ea8d7b27e197d223a04675e.zip |
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
* 'for-linus' of git://git.open-osd.org/linux-open-osd:
exofs: simple_write_end does not mark_inode_dirty
exofs: fix pnfs_osd re-definitions in pre-pnfs trees
Diffstat (limited to 'fs')
-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, fsdata); } +static int exofs_write_end(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned copied, + struct page *page, void *fsdata) +{ + struct inode *inode = mapping->host; + /* According to comment in simple_write_end i_mutex is held */ + loff_t i_size = inode->i_size; + int ret; + + ret = simple_write_end(file, mapping,pos, len, copied, page, fsdata); + if (i_size != inode->i_size) + mark_inode_dirty(inode); + return ret; +} + const struct address_space_operations exofs_aops = { .readpage = exofs_readpage, .readpages = exofs_readpages, .writepage = exofs_writepage, .writepages = exofs_writepages, .write_begin = exofs_write_begin_export, - .write_end = simple_write_end, + .write_end = exofs_write_end, }; /****************************************************************************** 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 @@ #ifndef __EXOFS_PNFS_H__ #define __EXOFS_PNFS_H__ -#if defined(CONFIG_PNFS) - - -/* FIXME: move this file to: linux/exportfs/pnfs_osd_xdr.h */ -#include "../nfs/objlayout/pnfs_osd_xdr.h" - -#else /* defined(CONFIG_PNFS) */ +#if ! defined(__PNFS_OSD_XDR_H__) enum pnfs_iomode { IOMODE_READ = 1, @@ -46,6 +40,6 @@ struct pnfs_osd_data_map { u32 odm_raid_algorithm; }; -#endif /* else defined(CONFIG_PNFS) */ +#endif /* ! defined(__PNFS_OSD_XDR_H__) */ #endif /* __EXOFS_PNFS_H__ */ |