]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext4/ioctl.c
ext4: add EXT4_IOC_ALLOC_DA_BLKS ioctl
[linux-2.6-omap-h63xx.git] / fs / ext4 / ioctl.c
index 22dd29f3ebc947ed8e67c384fa16671a498248d9..91e75f7a9e732c4ba6cdf909cfd3607f32dbd800 100644 (file)
@@ -262,6 +262,20 @@ setversion_out:
                return err;
        }
 
+       case EXT4_IOC_ALLOC_DA_BLKS:
+       {
+               int err;
+               if (!is_owner_or_cap(inode))
+                       return -EACCES;
+
+               err = mnt_want_write(filp->f_path.mnt);
+               if (err)
+                       return err;
+               err = ext4_alloc_da_blocks(inode);
+               mnt_drop_write(filp->f_path.mnt);
+               return err;
+       }
+
        default:
                return -ENOTTY;
        }