fix printk typo 'faild'
[pandora-kernel.git] / fs / exofs / inode.c
index 76d2a79..5862ae8 100644 (file)
@@ -508,7 +508,7 @@ static int write_exec(struct page_collect *pcol)
 
        pcol_copy = kmalloc(sizeof(*pcol_copy), GFP_KERNEL);
        if (!pcol_copy) {
-               EXOFS_ERR("write_exec: Faild to kmalloc(pcol)\n");
+               EXOFS_ERR("write_exec: Failed to kmalloc(pcol)\n");
                ret = -ENOMEM;
                goto err;
        }
@@ -524,7 +524,7 @@ static int write_exec(struct page_collect *pcol)
 
        ret = exofs_oi_write(oi, ios);
        if (unlikely(ret)) {
-               EXOFS_ERR("write_exec: exofs_oi_write() Faild\n");
+               EXOFS_ERR("write_exec: exofs_oi_write() Failed\n");
                goto err;
        }
 
@@ -625,7 +625,7 @@ try_again:
                /* split the request, next loop will start again */
                ret = write_exec(pcol);
                if (unlikely(ret)) {
-                       EXOFS_DBGMSG("write_exec faild => %d", ret);
+                       EXOFS_DBGMSG("write_exec failed => %d", ret);
                        goto fail;
                }
 
@@ -709,7 +709,7 @@ int exofs_write_begin(struct file *file, struct address_space *mapping,
                ret = simple_write_begin(file, mapping, pos, len, flags, pagep,
                                         fsdata);
                if (ret) {
-                       EXOFS_DBGMSG("simple_write_begin faild\n");
+                       EXOFS_DBGMSG("simple_write_begin failed\n");
                        return ret;
                }
 
@@ -722,7 +722,7 @@ int exofs_write_begin(struct file *file, struct address_space *mapping,
                if (ret) {
                        /*SetPageError was done by _readpage. Is it ok?*/
                        unlock_page(page);
-                       EXOFS_DBGMSG("__readpage_filler faild\n");
+                       EXOFS_DBGMSG("__readpage_filler failed\n");
                }
        }
 
@@ -755,6 +755,21 @@ static int exofs_write_end(struct file *file, struct address_space *mapping,
        return ret;
 }
 
+static int exofs_releasepage(struct page *page, gfp_t gfp)
+{
+       EXOFS_DBGMSG("page 0x%lx\n", page->index);
+       WARN_ON(1);
+       return try_to_free_buffers(page);
+}
+
+static void exofs_invalidatepage(struct page *page, unsigned long offset)
+{
+       EXOFS_DBGMSG("page_has_buffers=>%d\n", page_has_buffers(page));
+       WARN_ON(1);
+
+       block_invalidatepage(page, offset);
+}
+
 const struct address_space_operations exofs_aops = {
        .readpage       = exofs_readpage,
        .readpages      = exofs_readpages,
@@ -762,6 +777,21 @@ const struct address_space_operations exofs_aops = {
        .writepages     = exofs_writepages,
        .write_begin    = exofs_write_begin_export,
        .write_end      = exofs_write_end,
+       .releasepage    = exofs_releasepage,
+       .set_page_dirty = __set_page_dirty_nobuffers,
+       .invalidatepage = exofs_invalidatepage,
+
+       /* Not implemented Yet */
+       .bmap           = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */
+       .direct_IO      = NULL, /* TODO: Should be trivial to do */
+
+       /* With these NULL has special meaning or default is not exported */
+       .sync_page      = NULL,
+       .get_xip_mem    = NULL,
+       .migratepage    = NULL,
+       .launder_page   = NULL,
+       .is_partially_uptodate = NULL,
+       .error_remove_page = NULL,
 };
 
 /******************************************************************************
@@ -1082,7 +1112,7 @@ static void create_done(struct exofs_io_state *ios, void *p)
        atomic_dec(&sbi->s_curr_pending);
 
        if (unlikely(ret)) {
-               EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx",
+               EXOFS_ERR("object=0x%llx creation failed in pid=0x%llx",
                          _LLU(exofs_oi_objno(oi)), _LLU(sbi->layout.s_pid));
                /*TODO: When FS is corrupted creation can fail, object already
                 * exist. Get rid of this asynchronous creation, if exist
@@ -1123,16 +1153,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
        sbi = sb->s_fs_info;
 
        sb->s_dirt = 1;
-       inode->i_uid = current->cred->fsuid;
-       if (dir->i_mode & S_ISGID) {
-               inode->i_gid = dir->i_gid;
-               if (S_ISDIR(mode))
-                       mode |= S_ISGID;
-       } else {
-               inode->i_gid = current->cred->fsgid;
-       }
-       inode->i_mode = mode;
-
+       inode_init_owner(inode, dir, mode);
        inode->i_ino = sbi->s_nextid++;
        inode->i_blkbits = EXOFS_BLKSHIFT;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
@@ -1211,7 +1232,7 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
 
        args = kzalloc(sizeof(*args), GFP_KERNEL);
        if (!args) {
-               EXOFS_DBGMSG("Faild kzalloc of args\n");
+               EXOFS_DBGMSG("Failed kzalloc of args\n");
                return -ENOMEM;
        }