* [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error
@ 2013-03-27 8:31 fanchaoting
2013-04-03 19:30 ` bfields
2013-04-11 10:26 ` Benny Halevy
0 siblings, 2 replies; 3+ messages in thread
From: fanchaoting @ 2013-03-27 8:31 UTC (permalink / raw)
To: bfields@fieldses.org; +Cc: linux-nfs@vger.kernel.org
when create /proc/fs/nfs/exports error, we should remove /proc/fs/nfs,
if don't do it, it maybe cause Memory leak.
Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>
Reviewed-by: chendt.fnst <chendt.fnst@cn.fujitsu.com>
---
fs/nfsd/nfsctl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index f33455b..58e4db4 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1102,8 +1102,10 @@ static int create_proc_exports_entry(void)
return -ENOMEM;
entry = proc_create("exports", 0, entry,
&exports_proc_operations);
- if (!entry)
+ if (!entry) {
+ remove_proc_entry("fs/nfs", NULL);
return -ENOMEM;
+ }
return 0;
}
#else /* CONFIG_PROC_FS */
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error
2013-03-27 8:31 [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error fanchaoting
@ 2013-04-03 19:30 ` bfields
2013-04-11 10:26 ` Benny Halevy
1 sibling, 0 replies; 3+ messages in thread
From: bfields @ 2013-04-03 19:30 UTC (permalink / raw)
To: fanchaoting; +Cc: linux-nfs@vger.kernel.org
Thanks, applying.
--b.
On Wed, Mar 27, 2013 at 04:31:18PM +0800, fanchaoting wrote:
> when create /proc/fs/nfs/exports error, we should remove /proc/fs/nfs,
> if don't do it, it maybe cause Memory leak.
>
> Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>
> Reviewed-by: chendt.fnst <chendt.fnst@cn.fujitsu.com>
>
> ---
> fs/nfsd/nfsctl.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index f33455b..58e4db4 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -1102,8 +1102,10 @@ static int create_proc_exports_entry(void)
> return -ENOMEM;
> entry = proc_create("exports", 0, entry,
> &exports_proc_operations);
> - if (!entry)
> + if (!entry) {
> + remove_proc_entry("fs/nfs", NULL);
> return -ENOMEM;
> + }
> return 0;
> }
> #else /* CONFIG_PROC_FS */
> --
> 1.7.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error
2013-03-27 8:31 [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error fanchaoting
2013-04-03 19:30 ` bfields
@ 2013-04-11 10:26 ` Benny Halevy
1 sibling, 0 replies; 3+ messages in thread
From: Benny Halevy @ 2013-04-11 10:26 UTC (permalink / raw)
To: fanchaoting; +Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org
On 2013-03-27 10:31, fanchaoting wrote:
> when create /proc/fs/nfs/exports error, we should remove /proc/fs/nfs,
> if don't do it, it maybe cause Memory leak.
>
> Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>
> Reviewed-by: chendt.fnst <chendt.fnst@cn.fujitsu.com>
I merged this patch into pnfsd-block as well
to compliment
a55abd8 pnfsd-block: block layout should cleanup when register nfsd filesystem error
Thanks,
Benny
>
> ---
> fs/nfsd/nfsctl.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index f33455b..58e4db4 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -1102,8 +1102,10 @@ static int create_proc_exports_entry(void)
> return -ENOMEM;
> entry = proc_create("exports", 0, entry,
> &exports_proc_operations);
> - if (!entry)
> + if (!entry) {
> + remove_proc_entry("fs/nfs", NULL);
> return -ENOMEM;
> + }
> return 0;
> }
> #else /* CONFIG_PROC_FS */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-11 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 8:31 [PATCH 1/2] nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error fanchaoting
2013-04-03 19:30 ` bfields
2013-04-11 10:26 ` Benny Halevy
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).