]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/reiserfs/ioctl.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[linux-2.6-omap-h63xx.git] / fs / reiserfs / ioctl.c
index 11a0fcc2d402c23ec2c426c00d4181ee89188bb3..e0f0f098a523a8d1c3a41099ab76b411989a23a0 100644 (file)
@@ -57,6 +57,9 @@ int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
                        if (get_user(flags, (int __user *)arg))
                                return -EFAULT;
 
+                       /* Is it quota file? Do not allow user to mess with it. */
+                       if (IS_NOQUOTA(inode))
+                               return -EPERM;
                        if (((flags ^ REISERFS_I(inode)->
                              i_attrs) & (REISERFS_IMMUTABLE_FL |
                                          REISERFS_APPEND_FL))
@@ -128,6 +131,10 @@ long reiserfs_compat_ioctl(struct file *file, unsigned int cmd,
 }
 #endif
 
+int reiserfs_commit_write(struct file *f, struct page *page,
+                         unsigned from, unsigned to);
+int reiserfs_prepare_write(struct file *f, struct page *page,
+                          unsigned from, unsigned to);
 /*
 ** reiserfs_unpack
 ** Function try to convert tail from direct item into indirect.
@@ -175,15 +182,13 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp)
        if (!page) {
                goto out;
        }
-       retval =
-           mapping->a_ops->prepare_write(NULL, page, write_from, write_from);
+       retval = reiserfs_prepare_write(NULL, page, write_from, write_from);
        if (retval)
                goto out_unlock;
 
        /* conversion can change page contents, must flush */
        flush_dcache_page(page);
-       retval =
-           mapping->a_ops->commit_write(NULL, page, write_from, write_from);
+       retval = reiserfs_commit_write(NULL, page, write_from, write_from);
        REISERFS_I(inode)->i_flags |= i_nopack_mask;
 
       out_unlock: