aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 12:44:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 12:44:44 -0500
commitea77d73c464c1fae250486c3ab0908500ba96558 (patch)
tree58dd5ae19691c169e9a431b93558bd92a47ad31e /fs
parenta22180d2666c018f4fef6818074d78bb76ff2bda (diff)
parent861d66601acda6d7a2038fb3c95f68009128003a (diff)
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Pull exofs changes from Boaz Harrosh: "These are just 3 patches, the last two are bug fixes on the error paths in exofs. The important patch is the one to osd_uld which adds sysfs info to osd devices for use by user-mode clustering discovery software. I'm already sitting on this patch since before February this year, It is important for some of the big installation cluster systems, who's been compiling their own kernel just for that patch." Ugh. The osd_uld patch already went through the SCSI tree, so this was kind of pointless. But at least it has the two small error-path fixes.. * 'for-linus' of git://git.open-osd.org/linux-open-osd: exofs: don't leak io_state and pages on read error exofs: clean up the correct page collection on write error osduld: Add osdname & systemid sysfs at scsi_osd class
Diffstat (limited to 'fs')
-rw-r--r--fs/exofs/inode.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index b56181047751..d1f80abd8828 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -361,12 +361,12 @@ static int read_exec(struct page_collect *pcol)
361 return 0; 361 return 0;
362 362
363err: 363err:
364 if (!pcol->read_4_write) 364 if (!pcol_copy) /* Failed before ownership transfer */
365 _unlock_pcol_pages(pcol, ret, READ); 365 pcol_copy = pcol;
366 366 _unlock_pcol_pages(pcol_copy, ret, READ);
367 pcol_free(pcol); 367 pcol_free(pcol_copy);
368
369 kfree(pcol_copy); 368 kfree(pcol_copy);
369
370 return ret; 370 return ret;
371} 371}
372 372
@@ -676,8 +676,10 @@ static int write_exec(struct page_collect *pcol)
676 return 0; 676 return 0;
677 677
678err: 678err:
679 _unlock_pcol_pages(pcol, ret, WRITE); 679 if (!pcol_copy) /* Failed before ownership transfer */
680 pcol_free(pcol); 680 pcol_copy = pcol;
681 _unlock_pcol_pages(pcol_copy, ret, WRITE);
682 pcol_free(pcol_copy);
681 kfree(pcol_copy); 683 kfree(pcol_copy);
682 684
683 return ret; 685 return ret;