syslog_dev_flush() needs to check if the inode is a mountpoint before calling the flush() method. Noted by David Sidrane.

This commit is contained in:
Gregory Nutt
2016-06-22 05:57:59 -06:00
parent 35cb2fb87d
commit 82c890db23
3 changed files with 64 additions and 58 deletions
+3 -1
View File
@@ -583,7 +583,9 @@ int syslog_dev_flush(void)
/* Is this a mountpoint? Does it support the sync method? */
if (inode && inode->u.i_mops->sync)
if (inode != NULL && /* File opened (i.e., has inode)? */
INODE_IS_MOUNTPT(inode) && /* Inode is a mountpoint? */
inode->u.i_mops->sync != NULL) /* And supports synce method? */
{
/* Yes... synchronize to the stream */