aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dquot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dquot.c')
-rw-r--r--fs/dquot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 8ec4d6cc7633..7417a6ca3129 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -897,8 +897,9 @@ static void print_warning(struct dquot *dquot, const int warntype)
897 897
898 mutex_lock(&tty_mutex); 898 mutex_lock(&tty_mutex);
899 tty = get_current_tty(); 899 tty = get_current_tty();
900 mutex_unlock(&tty_mutex);
900 if (!tty) 901 if (!tty)
901 goto out_lock; 902 return;
902 tty_write_message(tty, dquot->dq_sb->s_id); 903 tty_write_message(tty, dquot->dq_sb->s_id);
903 if (warntype == QUOTA_NL_ISOFTWARN || warntype == QUOTA_NL_BSOFTWARN) 904 if (warntype == QUOTA_NL_ISOFTWARN || warntype == QUOTA_NL_BSOFTWARN)
904 tty_write_message(tty, ": warning, "); 905 tty_write_message(tty, ": warning, ");
@@ -926,8 +927,7 @@ static void print_warning(struct dquot *dquot, const int warntype)
926 break; 927 break;
927 } 928 }
928 tty_write_message(tty, msg); 929 tty_write_message(tty, msg);
929out_lock: 930 tty_kref_put(tty);
930 mutex_unlock(&tty_mutex);
931} 931}
932#endif 932#endif
933 933