aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/pohmelfs/inode.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2009-08-28 17:57:58 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:30 -0700
commit2d7cf8ef75abbe0d33d9115872d4545e9cefced2 (patch)
tree3446950a70190ec909b6a447e9a0e714004956d5 /drivers/staging/pohmelfs/inode.c
parent252a1b9162b6dbac7324854eb4137404932b574d (diff)
Staging: pohmelfs: sync with the development tree
* cache coherency protocol fix * proper timeout handling * implement dump/del all config group command (Signed-off-by: Pierpaolo Giacomin <yrz@anche.no>) Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/pohmelfs/inode.c')
-rw-r--r--drivers/staging/pohmelfs/inode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index 0b58f104370..c94de313922 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -1504,7 +1504,9 @@ static void pohmelfs_flush_inode(struct pohmelfs_inode *pi, unsigned int count)
inode->i_sb->s_op->write_inode(inode, 0);
}
+#ifdef POHMELFS_TRUNCATE_ON_INODE_FLUSH
truncate_inode_pages(inode->i_mapping, 0);
+#endif
pohmelfs_data_unlock(pi, 0, ~0, POHMELFS_WRITE_LOCK);
mutex_unlock(&inode->i_mutex);
@@ -1743,11 +1745,10 @@ static int pohmelfs_root_handshake(struct pohmelfs_sb *psb)
err = wait_event_interruptible_timeout(psb->wait,
(psb->flags != ~0),
psb->wait_on_page_timeout);
- if (!err) {
+ if (!err)
err = -ETIMEDOUT;
- } else {
+ else if (err > 0)
err = -psb->flags;
- }
if (err)
goto err_out_exit;