From: Alan Cox Date: Fri, 23 Nov 2007 20:11:51 +0000 (-0500) Subject: Import 2.0.35pre8 X-Git-Tag: 2.0.35pre8 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=d4e28ee2fb37dc4f2a4c676c797526f1dff4f532;p=history.git Import 2.0.35pre8 --- diff --git a/fs/dquot.c b/fs/dquot.c index 4ad2789037c1..af115eb5a494 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -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 diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 8949d572512c..07e4319bbd0f 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -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 */ diff --git a/fs/ext2/fsync.c b/fs/ext2/fsync.c index ad14d604ce11..7248144eadd9 100644 --- a/fs/ext2/fsync.c +++ b/fs/ext2/fsync.c @@ -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! diff --git a/include/linux/quota.h b/include/linux/quota.h index b4afe779f60b..47cf90cff057 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -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 */