diff mbox

Remove unecessary ERROR when removing non-empty directory

Message ID CAJtY7HXOYRsRVKckzAg9V2nBivWwSspk7SJaonqMxWcgqE-m9g@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Goldwyn Rodriues May 20, 2013, 3:06 p.m. UTC
While removing a non-empty directory, the kernel dumps a message:
(rmdir,21743,1):ocfs2_unlink:953 ERROR: status = -39

Suppress the error message from being printed in the dmesg so users
don't panic.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

---

Comments

Sunil Mushran May 22, 2013, 10:53 p.m. UTC | #1
Acked-by: Sunil Mushran <sunil.mushran@gmail.com>


On Mon, May 20, 2013 at 8:06 AM, Goldwyn Rodrigues <rgoldwyn@gmail.com>wrote:

> While removing a non-empty directory, the kernel dumps a message:
> (rmdir,21743,1):ocfs2_unlink:953 ERROR: status = -39
>
> Suppress the error message from being printed in the dmesg so users
> don't panic.
>
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> ---
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 04ee1b5..33c7b91 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -947,7 +947,7 @@ leave:
>   ocfs2_free_dir_lookup_result(&orphan_insert);
>   ocfs2_free_dir_lookup_result(&lookup);
>
> - if (status)
> + if (status && (status != -ENOTEMPTY))
>   mlog_errno(status);
>
>   return status;
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
xiaowei Hu May 24, 2013, 6:20 a.m. UTC | #2
Should we also add this (status != -ENOTEMPTY) in end of ocfs2_rename?
It also may hit this unecessary error.

Thanks,
xiaowei

On 05/20/2013 11:06 PM, Goldwyn Rodrigues wrote:
> While removing a non-empty directory, the kernel dumps a message:
> (rmdir,21743,1):ocfs2_unlink:953 ERROR: status = -39
>
> Suppress the error message from being printed in the dmesg so users
> don't panic.
>
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> ---
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 04ee1b5..33c7b91 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -947,7 +947,7 @@ leave:
>    ocfs2_free_dir_lookup_result(&orphan_insert);
>    ocfs2_free_dir_lookup_result(&lookup);
>
> - if (status)
> + if (status && (status != -ENOTEMPTY))
>    mlog_errno(status);
>
>    return status;
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
>
jeff.liu May 27, 2013, 6:53 a.m. UTC | #3
On 05/24/2013 02:20 PM, xiaowei.hu wrote:

> Should we also add this (status != -ENOTEMPTY) in end of ocfs2_rename?
> It also may hit this unecessary error.

This definitely is the same thing like ocfs2_unlink() that need to be fixed.

Thanks,
-Jeff

> 
> Thanks,
> xiaowei
> 
> On 05/20/2013 11:06 PM, Goldwyn Rodrigues wrote:
>> While removing a non-empty directory, the kernel dumps a message:
>> (rmdir,21743,1):ocfs2_unlink:953 ERROR: status = -39
>>
>> Suppress the error message from being printed in the dmesg so users
>> don't panic.
>>
>> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
>>
>> ---
>> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
>> index 04ee1b5..33c7b91 100644
>> --- a/fs/ocfs2/namei.c
>> +++ b/fs/ocfs2/namei.c
>> @@ -947,7 +947,7 @@ leave:
>>    ocfs2_free_dir_lookup_result(&orphan_insert);
>>    ocfs2_free_dir_lookup_result(&lookup);
>>
>> - if (status)
>> + if (status && (status != -ENOTEMPTY))
>>    mlog_errno(status);
>>
>>    return status;
>>
>> _______________________________________________
>> Ocfs2-devel mailing list
>> Ocfs2-devel@oss.oracle.com
>> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
>>
>>
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
diff mbox

Patch

diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 04ee1b5..33c7b91 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -947,7 +947,7 @@  leave:
  ocfs2_free_dir_lookup_result(&orphan_insert);
  ocfs2_free_dir_lookup_result(&lookup);

- if (status)
+ if (status && (status != -ENOTEMPTY))
  mlog_errno(status);

  return status;