* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret @ 2013-05-22 1:43 xiaowei.hu at oracle.com 2013-05-22 2:31 ` shencanquan 2013-05-28 22:35 ` Andrew Morton 0 siblings, 2 replies; 8+ messages in thread From: xiaowei.hu at oracle.com @ 2013-05-22 1:43 UTC (permalink / raw) To: ocfs2-devel From: "Xiaowei.Hu" <xiaowei.hu@oracle.com> --- fs/ocfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 50c93a8..422cbe0 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -2216,7 +2216,7 @@ out: brelse(orphan_dir_bh); - return 0; + return ret; } int ocfs2_create_inode_in_orphan(struct inode *dir, -- 1.7.11.7 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 1:43 [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret xiaowei.hu at oracle.com @ 2013-05-22 2:31 ` shencanquan 2013-05-22 2:38 ` xiaowei.hu 2013-05-28 22:35 ` Andrew Morton 1 sibling, 1 reply; 8+ messages in thread From: shencanquan @ 2013-05-22 2:31 UTC (permalink / raw) To: ocfs2-devel if return 0, what's wrong with this? On 2013/5/22 9:43, xiaowei.hu at oracle.com wrote: > From: "Xiaowei.Hu"<xiaowei.hu@oracle.com> > > --- > fs/ocfs2/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > index 50c93a8..422cbe0 100644 > --- a/fs/ocfs2/namei.c > +++ b/fs/ocfs2/namei.c > @@ -2216,7 +2216,7 @@ out: > > brelse(orphan_dir_bh); > > - return 0; > + return ret; > } > > int ocfs2_create_inode_in_orphan(struct inode *dir, ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 2:31 ` shencanquan @ 2013-05-22 2:38 ` xiaowei.hu 2013-05-22 2:44 ` shencanquan 0 siblings, 1 reply; 8+ messages in thread From: xiaowei.hu @ 2013-05-22 2:38 UTC (permalink / raw) To: ocfs2-devel if there is error happen in , for example EIO in __ocfs2_prepare_orphan_dir, ocfs2_prep_new_orphaned_file will release the inode_ac, the the caller of ocfs2_prep_new_orphaned_file get a 0 return, it will refer to a NULL ocfs2_alloc_context struct in the following functions.Kernel panic happens. On 05/22/2013 10:31 AM, shencanquan wrote: > if return 0, what's wrong with this? > On 2013/5/22 9:43, xiaowei.hu at oracle.com wrote: >> From: "Xiaowei.Hu"<xiaowei.hu@oracle.com> >> >> --- >> fs/ocfs2/namei.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c >> index 50c93a8..422cbe0 100644 >> --- a/fs/ocfs2/namei.c >> +++ b/fs/ocfs2/namei.c >> @@ -2216,7 +2216,7 @@ out: >> >> brelse(orphan_dir_bh); >> >> - return 0; >> + return ret; >> } >> >> int ocfs2_create_inode_in_orphan(struct inode *dir, > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 2:38 ` xiaowei.hu @ 2013-05-22 2:44 ` shencanquan 2013-05-22 22:50 ` Sunil Mushran 0 siblings, 1 reply; 8+ messages in thread From: shencanquan @ 2013-05-22 2:44 UTC (permalink / raw) To: ocfs2-devel On 2013/5/22 10:38, xiaowei.hu wrote: > if there is error happen in , for example EIO in > __ocfs2_prepare_orphan_dir, ocfs2_prep_new_orphaned_file will release > the inode_ac, the the caller of ocfs2_prep_new_orphaned_file get a 0 > return, it will refer to a NULL ocfs2_alloc_context struct in the > following functions.Kernel panic happens. Hmm, I see, this patch looks good . Reviewed-by: shencanquan <shencanquan@huawei.com> > > On 05/22/2013 10:31 AM, shencanquan wrote: >> if return 0, what's wrong with this? >> On 2013/5/22 9:43, xiaowei.hu at oracle.com wrote: >>> From: "Xiaowei.Hu"<xiaowei.hu@oracle.com> >>> >>> --- >>> fs/ocfs2/namei.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c >>> index 50c93a8..422cbe0 100644 >>> --- a/fs/ocfs2/namei.c >>> +++ b/fs/ocfs2/namei.c >>> @@ -2216,7 +2216,7 @@ out: >>> >>> brelse(orphan_dir_bh); >>> >>> - return 0; >>> + return ret; >>> } >>> >>> int ocfs2_create_inode_in_orphan(struct inode *dir, >> >> > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 2:44 ` shencanquan @ 2013-05-22 22:50 ` Sunil Mushran 2013-05-27 5:28 ` Joe Jin 0 siblings, 1 reply; 8+ messages in thread From: Sunil Mushran @ 2013-05-22 22:50 UTC (permalink / raw) To: ocfs2-devel Acked-by: Sunil Mushran <sunil.mushran@gmail.com> On Tue, May 21, 2013 at 7:44 PM, shencanquan <shencanquan@huawei.com> wrote: > On 2013/5/22 10:38, xiaowei.hu wrote: > > if there is error happen in , for example EIO in > > __ocfs2_prepare_orphan_dir, ocfs2_prep_new_orphaned_file will release > > the inode_ac, the the caller of ocfs2_prep_new_orphaned_file get a 0 > > return, it will refer to a NULL ocfs2_alloc_context struct in the > > following functions.Kernel panic happens. > Hmm, I see, this patch looks good . > Reviewed-by: shencanquan <shencanquan@huawei.com> > > > > On 05/22/2013 10:31 AM, shencanquan wrote: > >> if return 0, what's wrong with this? > >> On 2013/5/22 9:43, xiaowei.hu at oracle.com wrote: > >>> From: "Xiaowei.Hu"<xiaowei.hu@oracle.com> > >>> > >>> --- > >>> fs/ocfs2/namei.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > >>> index 50c93a8..422cbe0 100644 > >>> --- a/fs/ocfs2/namei.c > >>> +++ b/fs/ocfs2/namei.c > >>> @@ -2216,7 +2216,7 @@ out: > >>> > >>> brelse(orphan_dir_bh); > >>> > >>> - return 0; > >>> + return ret; > >>> } > >>> > >>> int ocfs2_create_inode_in_orphan(struct inode *dir, > >> > >> > > > > > > > > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20130522/be709a6f/attachment.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 22:50 ` Sunil Mushran @ 2013-05-27 5:28 ` Joe Jin 0 siblings, 0 replies; 8+ messages in thread From: Joe Jin @ 2013-05-27 5:28 UTC (permalink / raw) To: ocfs2-devel Cc to AKPM for include. On 05/23/13 06:50, Sunil Mushran wrote: > Acked-by: Sunil Mushran <sunil.mushran at gmail.com <mailto:sunil.mushran@gmail.com>> > > > On Tue, May 21, 2013 at 7:44 PM, shencanquan <shencanquan at huawei.com <mailto:shencanquan@huawei.com>> wrote: > > On 2013/5/22 10:38, xiaowei.hu <http://xiaowei.hu> wrote: > > if there is error happen in , for example EIO in > > __ocfs2_prepare_orphan_dir, ocfs2_prep_new_orphaned_file will release > > the inode_ac, the the caller of ocfs2_prep_new_orphaned_file get a 0 > > return, it will refer to a NULL ocfs2_alloc_context struct in the > > following functions.Kernel panic happens. > Hmm, I see, this patch looks good . > Reviewed-by: shencanquan <shencanquan at huawei.com <mailto:shencanquan@huawei.com>> > > > > On 05/22/2013 10:31 AM, shencanquan wrote: > >> if return 0, what's wrong with this? > >> On 2013/5/22 9:43, xiaowei.hu at oracle.com <mailto:xiaowei.hu@oracle.com> wrote: > >>> From: "Xiaowei.Hu"<xiaowei.hu at oracle.com <mailto:xiaowei.hu@oracle.com>> > >>> > >>> --- > >>> fs/ocfs2/namei.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > >>> index 50c93a8..422cbe0 100644 > >>> --- a/fs/ocfs2/namei.c > >>> +++ b/fs/ocfs2/namei.c > >>> @@ -2216,7 +2216,7 @@ out: > >>> > >>> brelse(orphan_dir_bh); > >>> > >>> - return 0; > >>> + return ret; > >>> } > >>> > >>> int ocfs2_create_inode_in_orphan(struct inode *dir, > >> > >> > > > > > > > > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com <mailto:Ocfs2-devel@oss.oracle.com> > https://oss.oracle.com/mailman/listinfo/ocfs2-devel > > -- Oracle <http://www.oracle.com> Joe Jin | Software Development Senior Manager | +8610.6106.5624 ORACLE | Linux and Virtualization No. 24 Zhongguancun Software Park, Haidian District | 100193 Beijing ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-22 1:43 [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret xiaowei.hu at oracle.com 2013-05-22 2:31 ` shencanquan @ 2013-05-28 22:35 ` Andrew Morton 2013-05-29 1:06 ` xiaowei.hu 1 sibling, 1 reply; 8+ messages in thread From: Andrew Morton @ 2013-05-28 22:35 UTC (permalink / raw) To: ocfs2-devel On Wed, 22 May 2013 09:43:16 +0800 xiaowei.hu at oracle.com wrote: > From: "Xiaowei.Hu" <xiaowei.hu@oracle.com> > > --- > fs/ocfs2/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c > index 50c93a8..422cbe0 100644 > --- a/fs/ocfs2/namei.c > +++ b/fs/ocfs2/namei.c > @@ -2216,7 +2216,7 @@ out: > > brelse(orphan_dir_bh); > > - return 0; > + return ret; > } > > int ocfs2_create_inode_in_orphan(struct inode *dir, The patch is missing your signed-off-by. I added it - please confirm this is OK. I also pulled together a changelog based on the discussion. Please do provide good changelogs. From: "Xiaowei.Hu" <xiaowei.hu@oracle.com> Subject: ocfs2: ocfs2_prep_new_orphaned_file() should return ret If an error occurs, for example an EIO in __ocfs2_prepare_orphan_dir, ocfs2_prep_new_orphaned_file will release the inode_ac, then when the caller of ocfs2_prep_new_orphaned_file gets a 0 return, it will refer to a NULL ocfs2_alloc_context struct in the following functions. A kernel panic happens. Signed-off-by: "Xiaowei.Hu" <xiaowei.hu@oracle.com> Reviewed-by: shencanquan <shencanquan@huawei.com> Acked-by: Sunil Mushran <sunil.mushran@gmail.com> Cc: Joe Jin <joe.jin@oracle.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- fs/ocfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ocfs2/namei.c~ocfs2-ocfs2_prep_new_orphaned_file-should-return-ret fs/ocfs2/namei.c --- a/fs/ocfs2/namei.c~ocfs2-ocfs2_prep_new_orphaned_file-should-return-ret +++ a/fs/ocfs2/namei.c @@ -2216,7 +2216,7 @@ out: brelse(orphan_dir_bh); - return 0; + return ret; } int ocfs2_create_inode_in_orphan(struct inode *dir, _ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret 2013-05-28 22:35 ` Andrew Morton @ 2013-05-29 1:06 ` xiaowei.hu 0 siblings, 0 replies; 8+ messages in thread From: xiaowei.hu @ 2013-05-29 1:06 UTC (permalink / raw) To: ocfs2-devel On 05/29/2013 06:35 AM, Andrew Morton wrote: > On Wed, 22 May 2013 09:43:16 +0800 xiaowei.hu at oracle.com wrote: > >> From: "Xiaowei.Hu" <xiaowei.hu@oracle.com> >> >> --- >> fs/ocfs2/namei.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c >> index 50c93a8..422cbe0 100644 >> --- a/fs/ocfs2/namei.c >> +++ b/fs/ocfs2/namei.c >> @@ -2216,7 +2216,7 @@ out: >> >> brelse(orphan_dir_bh); >> >> - return 0; >> + return ret; >> } >> >> int ocfs2_create_inode_in_orphan(struct inode *dir, > The patch is missing your signed-off-by. I added it - please confirm > this is OK. It is ok, sorry for missing that, thanks for adding it. > > I also pulled together a changelog based on the discussion. Please do > provide good changelogs. The change log looks great! > > > From: "Xiaowei.Hu" <xiaowei.hu@oracle.com> > Subject: ocfs2: ocfs2_prep_new_orphaned_file() should return ret > > If an error occurs, for example an EIO in __ocfs2_prepare_orphan_dir, > ocfs2_prep_new_orphaned_file will release the inode_ac, then when the > caller of ocfs2_prep_new_orphaned_file gets a 0 return, it will refer to a > NULL ocfs2_alloc_context struct in the following functions. A kernel > panic happens. > > Signed-off-by: "Xiaowei.Hu" <xiaowei.hu@oracle.com> > Reviewed-by: shencanquan <shencanquan@huawei.com> > Acked-by: Sunil Mushran <sunil.mushran@gmail.com> > Cc: Joe Jin <joe.jin@oracle.com> > Cc: Mark Fasheh <mfasheh@suse.com> > Cc: Joel Becker <jlbec@evilplan.org> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > fs/ocfs2/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -puN fs/ocfs2/namei.c~ocfs2-ocfs2_prep_new_orphaned_file-should-return-ret fs/ocfs2/namei.c > --- a/fs/ocfs2/namei.c~ocfs2-ocfs2_prep_new_orphaned_file-should-return-ret > +++ a/fs/ocfs2/namei.c > @@ -2216,7 +2216,7 @@ out: > > brelse(orphan_dir_bh); > > - return 0; > + return ret; > } > > int ocfs2_create_inode_in_orphan(struct inode *dir, > _ > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-29 1:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-22 1:43 [Ocfs2-devel] [PATCH] ocfs2_prep_new_orphaned_file should return ret xiaowei.hu at oracle.com 2013-05-22 2:31 ` shencanquan 2013-05-22 2:38 ` xiaowei.hu 2013-05-22 2:44 ` shencanquan 2013-05-22 22:50 ` Sunil Mushran 2013-05-27 5:28 ` Joe Jin 2013-05-28 22:35 ` Andrew Morton 2013-05-29 1:06 ` xiaowei.hu
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.