diff options
Diffstat (limited to 'fs/dquot.c')
| -rw-r--r-- | fs/dquot.c | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/fs/dquot.c b/fs/dquot.c index 81d87a413c68..9af789567e51 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
| @@ -250,7 +250,7 @@ static inline struct dquot *find_dquot(unsigned int hashent, struct super_block | |||
| 250 | /* Add a dquot to the tail of the free list */ | 250 | /* Add a dquot to the tail of the free list */ | 
| 251 | static inline void put_dquot_last(struct dquot *dquot) | 251 | static inline void put_dquot_last(struct dquot *dquot) | 
| 252 | { | 252 | { | 
| 253 | list_add(&dquot->dq_free, free_dquots.prev); | 253 | list_add_tail(&dquot->dq_free, &free_dquots); | 
| 254 | dqstats.free_dquots++; | 254 | dqstats.free_dquots++; | 
| 255 | } | 255 | } | 
| 256 | 256 | ||
| @@ -266,7 +266,7 @@ static inline void put_inuse(struct dquot *dquot) | |||
| 266 | { | 266 | { | 
| 267 | /* We add to the back of inuse list so we don't have to restart | 267 | /* We add to the back of inuse list so we don't have to restart | 
| 268 | * when traversing this list and we block */ | 268 | * when traversing this list and we block */ | 
| 269 | list_add(&dquot->dq_inuse, inuse_list.prev); | 269 | list_add_tail(&dquot->dq_inuse, &inuse_list); | 
| 270 | dqstats.allocated_dquots++; | 270 | dqstats.allocated_dquots++; | 
| 271 | } | 271 | } | 
| 272 | 272 | ||
| @@ -834,6 +834,9 @@ static void print_warning(struct dquot *dquot, const char warntype) | |||
| 834 | if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags))) | 834 | if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags))) | 
| 835 | return; | 835 | return; | 
| 836 | 836 | ||
| 837 | mutex_lock(&tty_mutex); | ||
| 838 | if (!current->signal->tty) | ||
| 839 | goto out_lock; | ||
| 837 | tty_write_message(current->signal->tty, dquot->dq_sb->s_id); | 840 | tty_write_message(current->signal->tty, dquot->dq_sb->s_id); | 
| 838 | if (warntype == ISOFTWARN || warntype == BSOFTWARN) | 841 | if (warntype == ISOFTWARN || warntype == BSOFTWARN) | 
| 839 | tty_write_message(current->signal->tty, ": warning, "); | 842 | tty_write_message(current->signal->tty, ": warning, "); | 
| @@ -861,6 +864,8 @@ static void print_warning(struct dquot *dquot, const char warntype) | |||
| 861 | break; | 864 | break; | 
| 862 | } | 865 | } | 
| 863 | tty_write_message(current->signal->tty, msg); | 866 | tty_write_message(current->signal->tty, msg); | 
| 867 | out_lock: | ||
| 868 | mutex_unlock(&tty_mutex); | ||
| 864 | } | 869 | } | 
| 865 | 870 | ||
| 866 | static inline void flush_warnings(struct dquot **dquots, char *warntype) | 871 | static inline void flush_warnings(struct dquot **dquots, char *warntype) | 
