]> git.neil.brown.name Git - history.git/commitdiff
Import 2.0.35pre8 2.0.35pre8
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:51 +0000 (15:11 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:51 +0000 (15:11 -0500)
fs/dquot.c
fs/ext2/dir.c
fs/ext2/fsync.c
include/linux/quota.h

index 4ad2789037c18a0cc750db5380d4450c11024e2d..af115eb5a49404ed550c0ee098b14ceb1dfffe2d 100644 (file)
@@ -692,7 +692,7 @@ void dquot_initialize(struct inode *inode, short type)
        short cnt;
        struct dquot *tmp;
 
-       if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) {
+       if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) || S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
                for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
                        if (type != -1 && cnt != type)
                                continue;
@@ -843,6 +843,15 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr, char direction)
                blocks = isize_to_blocks(inode->i_size, BLOCK_SIZE);
        else
                blocks = (inode->i_blocks / 2);
+               
+               
+       /*
+        *      This shouldnt be needed but the goal is to fix 2.0 not
+        *      do things in best of Torvalds style. Thats for 2.1...
+        */
+        
+       if(S_ISFIFO(inode->i_mode)||S_ISSOCK(inode->i_mode))
+               blocks = 0;
 
        /*
         * Build the transfer_from and transfer_to lists and check quotas to see
index 8949d572512c9b324f944509fc210ecd6a8fc102..07e4319bbd0feb27851d1d1813e132ec1474239a 100644 (file)
@@ -41,7 +41,7 @@ static struct file_operations ext2_dir_operations = {
        NULL,                   /* mmap */
        NULL,                   /* no special open code */
        NULL,                   /* no special release code */
-       file_fsync,             /* fsync */
+       ext2_sync_file,         /* fsync */
        NULL,                   /* fasync */
        NULL,                   /* check_media_change */
        NULL                    /* revalidate */
index ad14d604ce1172dcab4f6386771311c46161a8c7..7248144eadd978649472687482956f38df57a845 100644 (file)
@@ -167,9 +167,6 @@ int ext2_sync_file (struct inode * inode, struct file * file)
 {
        int wait, err = 0;
 
-       if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-            S_ISLNK(inode->i_mode)))
-               return -EINVAL;
        if (S_ISLNK(inode->i_mode) && !(inode->i_blocks))
                /*
                 * Don't sync fast links!
index b4afe779f60b9b375215298848923ee0a5e3de3a..47cf90cff057c8ff8abe43a4f0ea423ae3e5aaf3 100644 (file)
@@ -169,6 +169,8 @@ struct dquot {
    kdev_t dq_dev;                /* Device this applies to */
    short dq_flags;             /* see DQ_* */
    short dq_count;             /* reference count */
+   short dq_locknest;          /* lock nesting */      
+   struct task_struct *dq_lockproc;    /* process holding the lock */
    struct vfsmount *dq_mnt;     /* vfsmountpoint this applies to */
    struct dqblk dq_dqb;         /* diskquota usage */
    struct wait_queue *dq_wait; /* pointer to waitqueue */