Skip to contentSkip to conversation

ext3: explicitly remove inode from orphan list after failed direct io

PATCH In review Eric Sandeen 2 participants 2 messages Mar 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext3: explicitly remove inode from orphan list after failed direct io

Otherwise non-empty orphan list will be triggered on umount.

This is just an application of commit da1daf by Dmitry Monakhov to the same code in ext3.

---

fs/ext3/inode.c +2 -0
index 384b6eb..caf4c4a 100644
@@ -1925,6 +1925,8 @@ retry:
 			 * and pretend the write failed... */
 			ext3_truncate_failed_direct_write(inode);
 			ret = PTR_ERR(handle);
+			if (inode->i_nlink)
+				ext3_orphan_del(NULL, inode);
 			goto out;
 		}
 		if (inode->i_nlink)
#1 lore raw
Quoted 4 lines · Eric Sandeen

Otherwise non-empty orphan list will be triggered on umount.

This is just an application of commit da1daf by Dmitry Monakhov to the same code in ext3.

Thanks, I've merged the patch.

Honza

Quoted 17 lines

---

fs/ext3/inode.c +2 -0
index 384b6eb..caf4c4a 100644
@@ -1925,6 +1925,8 @@ retry:
 			 * and pretend the write failed... */
 			ext3_truncate_failed_direct_write(inode);
 			ret = PTR_ERR(handle);
+			if (inode->i_nlink)
+				ext3_orphan_del(NULL, inode);
 			goto out;
 		}
 		if (inode->i_nlink)
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR