linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] debugfs : Close the file handle and return in case of errors.
@ 2008-08-23 16:11 Manish Katiyar
  2008-08-24  3:15 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Manish Katiyar @ 2008-08-23 16:11 UTC (permalink / raw)
  To: Theodore Tso, linux-ext4; +Cc: mkatiyar

Close the filehandle and return in case if we are unable to expand the
directory during write.

Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>

---
 debugfs/debugfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 7039340..ab40de8 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -1366,6 +1366,7 @@ void do_write(int argc, char *argv[])
 		retval = ext2fs_expand_dir(current_fs, cwd);
 		if (retval) {
 			com_err(argv[0], retval, "while expanding directory");
+			close(fd);
 			return;
 		}
 		retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
-- 
1.5.4.3


Thanks -
Manish

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] debugfs : Close the file handle and return in case of errors.
  2008-08-23 16:11 [PATCH] debugfs : Close the file handle and return in case of errors Manish Katiyar
@ 2008-08-24  3:15 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-08-24  3:15 UTC (permalink / raw)
  To: Manish Katiyar; +Cc: linux-ext4

On Sat, Aug 23, 2008 at 09:41:25PM +0530, Manish Katiyar wrote:
> Close the filehandle and return in case if we are unable to expand the
> directory during write.

Thanks, applied.

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-24  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-23 16:11 [PATCH] debugfs : Close the file handle and return in case of errors Manish Katiyar
2008-08-24  3:15 ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).