From 6afb41c1e61dca15c481b49a9b165e1c0c992f7a Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Sun, 27 Dec 2009 17:01:42 +0200 Subject: [PATCH] --- yaml --- r: 178805 b: refs/heads/master c: efd124b999fb4d426b30675f1684521af0872789 h: refs/heads/master i: 178803: f181ac885bf9077f981798e5580f4cd7c0653e53 v: v3 --- [refs] | 2 +- trunk/fs/exofs/inode.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index fe1f7def6a65..fd1748c11809 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89be503021f550575fc896671b569941140b2c2e +refs/heads/master: efd124b999fb4d426b30675f1684521af0872789 diff --git a/trunk/fs/exofs/inode.c b/trunk/fs/exofs/inode.c index 698a8636d39c..2afbcebeda71 100644 --- a/trunk/fs/exofs/inode.c +++ b/trunk/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, }; /******************************************************************************