Messages in this thread Patch in this message | | | Date | Mon, 25 Oct 1999 14:03:59 +0200 | From | Jan Kara <> | Subject | Re: chown problem on filesystems with quotas |
| |
> Have not checked it under 2.2.11 but it seems it does not hang on 2.2.2 and > 2.2.10. > I'm not THAT sure because this server is newly installed and it has /var > separated. > I have a lot of servers running 2.2.10 (previously 2.2.2) and they have > quotas and chown works > Ok. And updatedb also works ok. So I might found out what was the problem. It was the deadlock on write_dquot() and it is there for ages. I thought I fixed it but it is still there only harder to trigger. Try following patch. The problem should go away.
Honza.
--- linux/fs/dquot.c Mon Oct 25 13:54:16 1999 +++ linux/fs/dquot.c Mon Oct 25 14:00:10 1999 @@ -1341,7 +1341,6 @@ dquot_incr_blocks(transfer_to[cnt], blocks); unlock_dquot(transfer_from[cnt]); - dqput(transfer_from[cnt]); if (inode->i_dquot[cnt] != NODQUOT) { struct dquot *temp = inode->i_dquot[cnt]; inode->i_dquot[cnt] = transfer_to[cnt]; @@ -1351,20 +1350,20 @@ unlock_dquot(transfer_to[cnt]); dqput(transfer_to[cnt]); } + dqput(transfer_from[cnt]); } return 0; put_all: for (disc = 0; disc < cnt; disc++) { /* There should be none or both pointers set but... */ - if (transfer_to[disc] != NODQUOT) { + if (transfer_to[disc] != NODQUOT) unlock_dquot(transfer_to[disc]); - dqput(transfer_to[disc]); - } - if (transfer_from[disc] != NODQUOT) { + if (transfer_from[disc] != NODQUOT) unlock_dquot(transfer_from[disc]); - dqput(transfer_from[disc]); - } + /* dqput() tests for NODQUOT itself... */ + dqput(transfer_from[disc]); + dqput(transfer_to[disc]); } return error; } | |