commit da45bac8bccd9ca56984b4deb76901ba522281de
Merge: d9f39bf... 494efbf...
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Sat Apr 28 21:02:12 2007 -0400
Merge branch 'master' of cvs:/home/git/unionfs-odf
diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index
6959beaa63b4fd928cec628d0a3abf999dbfc553..c76c53757ddf366eb52c83a00010d877cdbdfd21
100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -50,7 +50,7 @@ static ssize_t unionfs_aio_read(struct k
int err;
err = generic_file_aio_read(iocb, iov, nr_segs, pos);
-
+
if (err == -EIOCBQUEUED)
err = wait_on_sync_kiocb(iocb);
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index
57792d584378b00423923f141ed7835d05475dea..7d27bd8018d2d2be4001c2c7d327e2368fd9bf79
100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -162,6 +162,9 @@ int unionfs_readpage(struct file *file,
{
int err;
+ if ((err = unionfs_file_revalidate(file, 0)))
+ goto out_err;
+
err = unionfs_do_readpage(file, page);
/*
@@ -170,6 +173,7 @@ int unionfs_readpage(struct file *file,
* it
*/
+out_err:
unlock_page(page);
return err;
@@ -178,7 +182,7 @@ int unionfs_readpage(struct file *file,
int unionfs_prepare_write(struct file *file, struct page *page, unsigned from,
unsigned to)
{
- return 0;
+ return unionfs_file_revalidate(file, 1);
}
int unionfs_commit_write(struct file *file, struct page *page, unsigned from,
@@ -194,6 +198,9 @@ int unionfs_commit_write(struct file *fi
BUG_ON(file == NULL);
+ if ((err = unionfs_file_revalidate(file, 1)))
+ goto out;
+
inode = page->mapping->host; /* CPW: Moved below
print_entry_location */
lower_inode = unionfs_lower_inode(inode);
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index
bb63eb614149655f6c808c4a02fb9961be4bc7c8..335c2213b33fc2ea212ac4fd079bb12089ca2c36
100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1490,7 +1490,9 @@ int odf_write_sb_data(struct odf_sb_info
err = -EINVAL;
goto out;
}
- else if (d_content->d_inode) {
+
+ dget(d_content);
+ if (d_content->d_inode) {
/* truncate */
attr.ia_size = 0;
attr.ia_valid = ATTR_SIZE | ATTR_FORCE;
@@ -1630,7 +1632,9 @@ char *odf_read_sb_data(struct odf_sb_inf
err = -EINVAL;
goto out_err;
}
- else if (!d_content->d_inode) {
+
+ dget(d_content);
+ if (!d_content->d_inode) {
dput(d_content);
err = -EINVAL;
goto out_err;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs