lkml.org 
[lkml]   [1999]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 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;
}
\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.182 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site