* [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
@ 2015-02-27 23:51 ` Daeseok Youn
0 siblings, 0 replies; 6+ messages in thread
From: Daeseok Youn @ 2015-02-27 23:51 UTC (permalink / raw)
To: mfasheh, akpm; +Cc: jlbec, ocfs2-devel, linux-kernel, richard.weinberger
There is no error handle when ocfs2_journal_access_di() is failed.
And also it doesn't need to call ocfs2_dx_dir_insert() when
ocfs2_journal_access_db() is failed.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
RESEND: this patch rebased by 1/4
fs/ocfs2/dir.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index c1ab24f..c63f2b6 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
insert_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
- if (ocfs2_dir_indexed(dir)) {
+ if (!retval && ocfs2_dir_indexed(dir))
retval = ocfs2_dx_dir_insert(dir,
handle,
lookup);
- if (retval)
- goto bail;
- }
}
+ if (retval)
+ goto bail;
+
/* By now the buffer is marked for journaling */
offset += le16_to_cpu(de->rec_len);
if (le64_to_cpu(de->inode)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
@ 2015-02-27 23:51 ` Daeseok Youn
0 siblings, 0 replies; 6+ messages in thread
From: Daeseok Youn @ 2015-02-27 23:51 UTC (permalink / raw)
To: mfasheh, akpm; +Cc: jlbec, ocfs2-devel, linux-kernel, richard.weinberger
There is no error handle when ocfs2_journal_access_di() is failed.
And also it doesn't need to call ocfs2_dx_dir_insert() when
ocfs2_journal_access_db() is failed.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
RESEND: this patch rebased by 1/4
fs/ocfs2/dir.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index c1ab24f..c63f2b6 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
insert_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
- if (ocfs2_dir_indexed(dir)) {
+ if (!retval && ocfs2_dir_indexed(dir))
retval = ocfs2_dx_dir_insert(dir,
handle,
lookup);
- if (retval)
- goto bail;
- }
}
+ if (retval)
+ goto bail;
+
/* By now the buffer is marked for journaling */
offset += le16_to_cpu(de->rec_len);
if (le64_to_cpu(de->inode)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
2015-02-27 23:51 ` Daeseok Youn
@ 2015-03-19 11:00 ` Joseph Qi
-1 siblings, 0 replies; 6+ messages in thread
From: Joseph Qi @ 2015-03-19 11:00 UTC (permalink / raw)
To: Daeseok Youn; +Cc: mfasheh, akpm, richard.weinberger, ocfs2-devel, linux-kernel
On 2015/2/28 7:51, Daeseok Youn wrote:
> There is no error handle when ocfs2_journal_access_di() is failed.
> And also it doesn't need to call ocfs2_dx_dir_insert() when
> ocfs2_journal_access_db() is failed.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> RESEND: this patch rebased by 1/4
>
> fs/ocfs2/dir.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c1ab24f..c63f2b6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
> insert_bh,
> OCFS2_JOURNAL_ACCESS_WRITE);
>
> - if (ocfs2_dir_indexed(dir)) {
> + if (!retval && ocfs2_dir_indexed(dir))
> retval = ocfs2_dx_dir_insert(dir,
> handle,
> lookup);
> - if (retval)
> - goto bail;
> - }
> }
>
> + if (retval)
> + goto bail;
> +
> /* By now the buffer is marked for journaling */
> offset += le16_to_cpu(de->rec_len);
> if (le64_to_cpu(de->inode)) {
>
I agree with you that we should do the corresponding check.
But I don't think we need remove the mlog as described in my previous
mail.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
@ 2015-03-19 11:00 ` Joseph Qi
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Qi @ 2015-03-19 11:00 UTC (permalink / raw)
To: Daeseok Youn; +Cc: mfasheh, akpm, richard.weinberger, ocfs2-devel, linux-kernel
On 2015/2/28 7:51, Daeseok Youn wrote:
> There is no error handle when ocfs2_journal_access_di() is failed.
> And also it doesn't need to call ocfs2_dx_dir_insert() when
> ocfs2_journal_access_db() is failed.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> RESEND: this patch rebased by 1/4
>
> fs/ocfs2/dir.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c1ab24f..c63f2b6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
> insert_bh,
> OCFS2_JOURNAL_ACCESS_WRITE);
>
> - if (ocfs2_dir_indexed(dir)) {
> + if (!retval && ocfs2_dir_indexed(dir))
> retval = ocfs2_dx_dir_insert(dir,
> handle,
> lookup);
> - if (retval)
> - goto bail;
> - }
> }
>
> + if (retval)
> + goto bail;
> +
> /* By now the buffer is marked for journaling */
> offset += le16_to_cpu(de->rec_len);
> if (le64_to_cpu(de->inode)) {
>
I agree with you that we should do the corresponding check.
But I don't think we need remove the mlog as described in my previous
mail.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
2015-03-19 11:00 ` Joseph Qi
@ 2015-03-20 2:34 ` DaeSeok Youn
-1 siblings, 0 replies; 6+ messages in thread
From: DaeSeok Youn @ 2015-03-20 2:34 UTC (permalink / raw)
To: Joseph Qi
Cc: mfasheh, Andrew Morton, Richard Weinberger,
ocfs2-devel@oss.oracle.com, linux-kernel
OK.
I will send this patch again.
This patch will be based on https://lkml.org/lkml/2015/2/27/655
thanks
regards,
Daeseok Youn
2015-03-19 20:00 GMT+09:00 Joseph Qi <joseph.qi@huawei.com>:
> On 2015/2/28 7:51, Daeseok Youn wrote:
>> There is no error handle when ocfs2_journal_access_di() is failed.
>> And also it doesn't need to call ocfs2_dx_dir_insert() when
>> ocfs2_journal_access_db() is failed.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> RESEND: this patch rebased by 1/4
>>
>> fs/ocfs2/dir.c | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
>> index c1ab24f..c63f2b6 100644
>> --- a/fs/ocfs2/dir.c
>> +++ b/fs/ocfs2/dir.c
>> @@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
>> insert_bh,
>> OCFS2_JOURNAL_ACCESS_WRITE);
>>
>> - if (ocfs2_dir_indexed(dir)) {
>> + if (!retval && ocfs2_dir_indexed(dir))
>> retval = ocfs2_dx_dir_insert(dir,
>> handle,
>> lookup);
>> - if (retval)
>> - goto bail;
>> - }
>> }
>>
>> + if (retval)
>> + goto bail;
>> +
>> /* By now the buffer is marked for journaling */
>> offset += le16_to_cpu(de->rec_len);
>> if (le64_to_cpu(de->inode)) {
>>
> I agree with you that we should do the corresponding check.
> But I don't think we need remove the mlog as described in my previous
> mail.
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call
@ 2015-03-20 2:34 ` DaeSeok Youn
0 siblings, 0 replies; 6+ messages in thread
From: DaeSeok Youn @ 2015-03-20 2:34 UTC (permalink / raw)
To: Joseph Qi
Cc: mfasheh, Andrew Morton, Richard Weinberger,
ocfs2-devel@oss.oracle.com, linux-kernel
OK.
I will send this patch again.
This patch will be based on https://lkml.org/lkml/2015/2/27/655
thanks
regards,
Daeseok Youn
2015-03-19 20:00 GMT+09:00 Joseph Qi <joseph.qi@huawei.com>:
> On 2015/2/28 7:51, Daeseok Youn wrote:
>> There is no error handle when ocfs2_journal_access_di() is failed.
>> And also it doesn't need to call ocfs2_dx_dir_insert() when
>> ocfs2_journal_access_db() is failed.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> RESEND: this patch rebased by 1/4
>>
>> fs/ocfs2/dir.c | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
>> index c1ab24f..c63f2b6 100644
>> --- a/fs/ocfs2/dir.c
>> +++ b/fs/ocfs2/dir.c
>> @@ -1703,15 +1703,15 @@ int __ocfs2_add_entry(handle_t *handle,
>> insert_bh,
>> OCFS2_JOURNAL_ACCESS_WRITE);
>>
>> - if (ocfs2_dir_indexed(dir)) {
>> + if (!retval && ocfs2_dir_indexed(dir))
>> retval = ocfs2_dx_dir_insert(dir,
>> handle,
>> lookup);
>> - if (retval)
>> - goto bail;
>> - }
>> }
>>
>> + if (retval)
>> + goto bail;
>> +
>> /* By now the buffer is marked for journaling */
>> offset += le16_to_cpu(de->rec_len);
>> if (le64_to_cpu(de->inode)) {
>>
> I agree with you that we should do the corresponding check.
> But I don't think we need remove the mlog as described in my previous
> mail.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-20 2:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 23:51 [Ocfs2-devel] [PATCH 3/4 RESEND] ocfs2: need to handle error for ocfs2_journal_access_di() call Daeseok Youn
2015-02-27 23:51 ` Daeseok Youn
2015-03-19 11:00 ` [Ocfs2-devel] " Joseph Qi
2015-03-19 11:00 ` Joseph Qi
2015-03-20 2:34 ` DaeSeok Youn
2015-03-20 2:34 ` DaeSeok Youn
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.