Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
Linus Torvalds committed Jan 6, 2010
2 parents 34e2fde + efd124b commit c6f7afa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
17 changes: 16 additions & 1 deletion fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

/******************************************************************************
Expand Down
10 changes: 2 additions & 8 deletions fs/exofs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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__ */

0 comments on commit c6f7afa

Please sign in to comment.