If vma is shared and the file was opened for writing,
we should also create writeback fid because vma may be
mprotected writable even if now readonly.
Signed-off-by: Chengguang Xu
---
fs/9p/vfs_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/9p/vfs_file.c b/fs/9p
在 星期一, 2020-12-07 19:24:10 Dominique Martinet 撰写
> Chengguang Xu wrote on Mon, Dec 07, 2020:
> > > , VM_MAYWRITE is set anytime we have a shared map where file has
> > > been opened read-write, which seems to be what you want with regards to
> > >
在 星期一, 2020-12-07 04:53:18 Dominique Martinet 撰写
> Dominique Martinet wrote on Sun, Dec 06, 2020:
> > Chengguang Xu wrote on Sat, Dec 05, 2020:
> > > If vma is shared and the file was opened for writing,
> > > we should also create wr
If vma is shared and the file was opened for writing,
we should also create writeback fid because vma may be
mprotected writable even if now readonly.
Signed-off-by: Chengguang Xu
---
Caveat: Only compile tested.
fs/9p/vfs_file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
Count the number of quotas which are needed to initialize,
instead of just setting to 1 so that we may avoid unnecessary
process in special case.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/quota/dquot.c b/fs/quota
In order to avoid using incorrect mnt, we should set
mnt to NULL when we get error from mount_one_hugetlbfs().
Signed-off-by: Chengguang Xu
---
fs/hugetlbfs/inode.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index
It's not a functinal change, it's just for keeping
consistent coding style.
Signed-off-by: Chengguang Xu
---
fs/quota/quota_v1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c
index c740e5572eb8..cd92e5fa0062 100644
--- a/fs/quota/quota_v1.c
+++ b
Should set transfer_to[USRQUOTA/GRPQUOTA] to NULL
on error case before jump to do dqput().
Signed-off-by: Chengguang Xu
---
fs/ocfs2/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 2e982db3e1ae..53939bf9d7d2 100644
--- a/fs/ocfs2/file.c
+++ b
Check quota type in early stage so we can avoid many
unncessary operations when the type is wrong.
Signed-off-by: Chengguang Xu
---
fs/quota/quota.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index cb13fb76dbee..5444d3c4d93f
It is meaningless to increase DQST_LOOKUPS number while iterating
over dirty/inuse list, so just avoid it.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 6e826b454082..00a3c6df2ea3 100644
--- a/fs
Code cleanup for hash bits calculation by
calling ilog2().
Signed-off-by: Chengguang Xu
---
v1->v2:
- Calculate hash bits by directly calling ilog2().
fs/quota/dquot.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
in
Code cleanup for hash bits calculation by
calling rounddown_pow_of_two() and ilog2()
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 6e826b454082..679dd3b5db70 100644
--- a/fs
-by: Chengguang Xu
---
fs/9p/vfs_file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 4cc966a31cb3..fe7f0bd2048e 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -513,6 +513,7 @@ v9fs_mmap_file_mmap(struct file *filp, struct
vm_area_struct
We reset time limit when current usage is smaller
or equal to soft limit in other place, so follow
this rule in do_set_dqblk().
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index
Convert mount option checking code to test_opt() in
qnx6_show_options().
Signed-off-by: Chengguang Xu
---
fs/qnx6/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/qnx6/inode.c b/fs/qnx6/inode.c
index 59cf45f6be49..c3a80700e7a6 100644
--- a/fs/qnx6/inode.c
+++ b
When fail from creating cache jbd2_inode_cache, we will
destroy previously created cache jbd2_handle_cache twice.
This patch fixes it by sperating each cache
initialization/destruction to individual function.
Signed-off-by: Chengguang Xu
---
v2:
- Seperate cache initialization/destruction
Actually there are four lists for dquot management, so add
the description of dqui_dirty_list to comment.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba
Some function comments about projid are described
as uid, so fix it.
Signed-off-by: Chengguang Xu
---
kernel/user_namespace.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 923414a246e9..6e917fc072d0 100644
When fail from creating cache jbd2_inode_cache, we will
destroy previously created cache jbd2_handle_cache twice.
This patch fixes it by removing first destroy in error path.
Signed-off-by: Chengguang Xu
---
fs/jbd2/journal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/jbd2/journal.c
jbd2_journal_init_journal_head_cache() only be called once,
so add __init annotation for it and do some code cleanup.
Signed-off-by: Chengguang Xu
---
fs/jbd2/journal.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index
jbd2_journal_destroy_caches() can handle destruction work
for all caches, so we don't have to destroy previously
created cache in error path, it also makes the code simpler.
Signed-off-by: Chengguang Xu
---
fs/jbd2/revoke.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff
code analyzing tool(like Smatch) and also make the code more
easy to understand.
Suggested-by: Dan Carpenter
Signed-off-by: Chengguang Xu
---
v1->v2:
- Rebase against the latest char-misc-next.
- Modify signed-off mail address.
fs/char_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 delet
When we fail from allocating inode/space, we back out
the change we already did. In a special case which has
exceeded soft limit by the change, we should also check
time limit and reset it properly.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 14 ++
1 file changed, 6
Set init_needed flag only when successfully getting dquot,
so that we can skip unnecessary subsequent operation.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba
code analyzing tool(like Smatch) and also make the code more
easy to understand.
Suggested-by: Dan Carpenter
Signed-off-by: Chengguang Xu
---
fs/char_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index d18cad28c1c3..00dfe17871ac 100644
We need to check return code only when calling ->read_dqblk(),
so fix it properly.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba..934b8f3f9e57 100644
--- a
The assignment of variable ret is redundant because the
value of ret is 0 after calling v2_read_header() in normal
case.
Signed-off-by: Chengguang Xu
---
fs/quota/quota_v2.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
index a73e5b34db41
code analyzing tool(like Smatch) and also make the code more
easy to understand.
Suggested-by: Dan Carpenter
Signed-off-by: Chengguang Xu
---
fs/char_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index df6a54045ac4..00dfe17871ac 100644
> Sent: Friday, April 05, 2019 at 8:32 PM
> From: "Greg KH"
> To: "Chengguang Xu"
> Cc: dan.carpen...@oracle.com, linux-fsde...@vger.kernel.org,
> v...@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3 3/4] chardev: code c
It's just code cleanup, not functional change.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
v2->v3:
- Set variable ret to '-EBUSY' before checking minor range overlap.
fs/char_dev.
The function comment of __register_chrdev_region()
is out of date, so update it based on the code.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
fs/char_dev.c | 9 +++--
1 file changed, 3 insertions(+), 6 deleti
register_chrdev_region() carefully checks minor range
before calling __register_chrdev_region() but there is
another path from alloc_chrdev_region() which does not
check the range properly. So add a check for given minor
range in __register_chrdev_region().
Signed-off-by: Chengguang Xu
---
v1
Current overlap checking cannot correctly handle
a case which is baseminor < existing baseminor &&
baseminor + minorct > existing baseminor + minorct.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
Replace (flags & DQUOT_SPACE_RESERVE) with
variable reserve.
Signed-off-by: Chengguang Xu
---
fs/quota/dquot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba..00de508f9d2e 100644
--- a/fs/quota/dquot.c
+++
It's just code cleanup, not functional change.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
fs/char_dev.c | 69 +--
1 file changed, 28 insertions(+), 41 deleti
register_chrdev_region() carefully checks minor range
before calling __register_chrdev_region() but there is
another path from alloc_chrdev_region() which does not
check the range properly. So add a check for given minor
range in __register_chrdev_region().
Signed-off-by: Chengguang Xu
---
v1
Current overlap checking cannot correctly handle
a case which is baseminor < existing baseminor &&
baseminor + minorct > existing baseminor + minorct.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
The function comment of __register_chrdev_region()
is out of date, so update it based on the code.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Split fix and cleanup patches.
- Remove printing minor range in chrdev_show().
fs/char_dev.c | 9 +++--
1 file changed, 3 insertions(+), 6 deleti
Currently chardev allows to share major, showing
major with minor range for chardev will be more
helpful.
Signed-off-by: Chengguang Xu
---
fs/char_dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index b25b1da097d5..6f00acdeb308 100644
Current overlap check of minor range cannot correctly
handle a case which is baseminor < existing baseminor &&
baseminor + minorct > existing baseminor + minorct.
Fix it and meanwhile do some code cleanups.
Fixes: 01d553d0fe9f90 ("Chardev checking of overlapping ranges")
S
Actually, total amount of available minor number
for a single major is MINORMARK + 1. So expand
minor range when registering chrdev region.
Signed-off-by: Chengguang Xu
---
drivers/misc/mei/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/main.c b
Remove unnecessary ERR_PTR()/PTR_ERR() cast in
proc_setup_thread_self().
Signed-off-by: Chengguang Xu
---
fs/proc/thread_self.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c
index b905010ca9eb..f61ae53533f5
Remove unnecessary ERR_PTR()/PTR_ERR() cast in proc_setup_self().
Signed-off-by: Chengguang Xu
---
fs/proc/self.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/proc/self.c b/fs/proc/self.c
index 127265e5c55f..57c0a1047250 100644
--- a/fs/proc/self.c
It is not necessary to check idev->info several times under
mutex lock, so just remove redundant check.
Signed-off-by: Chengguang Xu
---
drivers/uio/uio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 46e5c1c31
Should jump to lable err_infoopen when idev->info is NULL
in uio_open().
Signed-off-by: Chengguang Xu
---
drivers/uio/uio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 131342280b46..46e5c1c31ebe 100644
--- a/drivers/uio/ui
Commit-ID: 765d28f136291f9639e3c031a1070fb76d6625c7
Gitweb: https://git.kernel.org/tip/765d28f136291f9639e3c031a1070fb76d6625c7
Author: Chengguang Xu
AuthorDate: Tue, 12 Jun 2018 19:48:52 +0800
Committer: Thomas Gleixner
CommitDate: Thu, 2 Aug 2018 14:27:35 +0200
x86/mm: Remove
Commit-ID: 765d28f136291f9639e3c031a1070fb76d6625c7
Gitweb: https://git.kernel.org/tip/765d28f136291f9639e3c031a1070fb76d6625c7
Author: Chengguang Xu
AuthorDate: Tue, 12 Jun 2018 19:48:52 +0800
Committer: Thomas Gleixner
CommitDate: Thu, 2 Aug 2018 14:27:35 +0200
x86/mm: Remove
When we try to truncate read count in generic_file_buffered_read(),
should deliver (sb->s_maxbytes - offset) as maximum count not
sb->s_maxbytes itself.
Signed-off-by: Chengguang Xu
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/fil
When we try to truncate read count in generic_file_buffered_read(),
should deliver (sb->s_maxbytes - offset) as maximum count not
sb->s_maxbytes itself.
Signed-off-by: Chengguang Xu
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/fil
If PAGE_SIZE is unsigned type then negative error code will be
larger than PAGE_SIZE.
Signed-off-by: Chengguang Xu
---
kernel/power/swap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index c2bcf97d24c8..d7f6c1a288d3 100644
If PAGE_SIZE is unsigned type then negative error code will be
larger than PAGE_SIZE.
Signed-off-by: Chengguang Xu
---
kernel/power/swap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index c2bcf97d24c8..d7f6c1a288d3 100644
Signed-off-by: Chengguang Xu
---
fs/exofs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index f3e17a9..75b5db0 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -118,7 +118,7 @@ static int parse_options(char *options, struct
Signed-off-by: Chengguang Xu
---
fs/exofs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index f3e17a9..75b5db0 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -118,7 +118,7 @@ static int parse_options(char *options, struct
There are some cases can cause memory leak when parsing
option 'osdname'.
Signed-off-by: Chengguang Xu
---
fs/exofs/super.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 719a315..f3e17a9 100644
--- a/fs/exofs/super.c
+++ b/fs
There are some cases can cause memory leak when parsing
option 'osdname'.
Signed-off-by: Chengguang Xu
---
fs/exofs/super.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 719a315..f3e17a9 100644
--- a/fs/exofs/super.c
+++ b/fs
The flag 'SLAB_PANIC' implies panic when encouter failure,
So there is no need to check NULL pointer for cache creation.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Keep return type as int instead of changing to void.
arch/x86/mm/pgtable.c | 3 ---
1 file changed, 3 deletions(-)
diff --
The flag 'SLAB_PANIC' implies panic when encouter failure,
So there is no need to check NULL pointer for cache creation.
Signed-off-by: Chengguang Xu
---
v1->v2:
- Keep return type as int instead of changing to void.
arch/x86/mm/pgtable.c | 3 ---
1 file changed, 3 deletions(-)
diff --
The flag 'SLAB_PANIC' implies panic when encouter failure,
so there is no need to check NULL pointer and return error
code.
Signed-off-by: Chengguang Xu
---
arch/x86/mm/pgtable.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm
The flag 'SLAB_PANIC' implies panic when encouter failure,
so there is no need to check NULL pointer and return error
code.
Signed-off-by: Chengguang Xu
---
arch/x86/mm/pgtable.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm
When specifying option 'prefix' multiple times,
current option parsing will cause memory leak.
Hence, call kfree for previous one in this case.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/affs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/affs/super.c b/fs/affs/s
When specifying option 'prefix' multiple times,
current option parsing will cause memory leak.
Hence, call kfree for previous one in this case.
Signed-off-by: Chengguang Xu
---
fs/affs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/affs/super.c b/fs/affs/super.c
index e602619
' and 'access'
when detecting -EINVAL.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
Changes since v2:
- Introduce a new temporary variable to avoid overriding error code.
- Delete redundant continue in error case.
Changes since v1:
- Do not change behavior when detecting ENOMEM or unreco
' and 'access'
when detecting -EINVAL.
Signed-off-by: Chengguang Xu
---
Changes since v2:
- Introduce a new temporary variable to avoid overriding error code.
- Delete redundant continue in error case.
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
fs/9p
' and 'version'
when detecting -EINVAL.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
Changes since v2:
- Introduce a new temporary variable to avoid overriding error code.
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
net/9p/client.
' and 'version'
when detecting -EINVAL.
Signed-off-by: Chengguang Xu
---
Changes since v2:
- Introduce a new temporary variable to avoid overriding error code.
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
net/9p/client.c | 13 +
1 file
When specifying nls option multiple times in a mount,
current option parsing will cause inaccurate refcount of nls
module. Hence, call unload_nls for previous one in this case.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/hfsplus/options.c | 4 +++-
1 file changed, 3 insertions
When specifying nls option multiple times in a mount,
current option parsing will cause inaccurate refcount of nls
module. Hence, call unload_nls for previous one in this case.
Signed-off-by: Chengguang Xu
---
fs/hfsplus/options.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
When specifying iocharset/codepage multiple times in a mount,
current option parsing will cause inaccurate refcount of nls
module. Hence, call unload_nls for previous one in this case.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/hfs/super.c | 8 ++--
1 file changed, 6 inse
When specifying iocharset/codepage multiple times in a mount,
current option parsing will cause inaccurate refcount of nls
module. Hence, call unload_nls for previous one in this case.
Signed-off-by: Chengguang Xu
---
fs/hfs/super.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions
' and 'version'
when detecting EINVAL.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
net/9p/client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/cl
' and 'version'
when detecting EINVAL.
Signed-off-by: Chengguang Xu
---
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
net/9p/client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 21e6df1
' and 'access'
when detecting EINVAL.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
fs/9p/v9fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
' and 'access'
when detecting EINVAL.
Signed-off-by: Chengguang Xu
---
Changes since v1:
- Do not change behavior when detecting ENOMEM or unrecognized options.
fs/9p/v9fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index e622f0f..2c7a0ef
and the case of memory
allocation error in option parsing.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
net/9p/client.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 21e6df1..066f136 100644
--- a/net/9p/client.c
and the case of memory
allocation error in option parsing.
Signed-off-by: Chengguang Xu
---
net/9p/client.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 21e6df1..066f136 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
and the case of memory
allocation error in option parsing.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/9p/v9fs.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index e622f0f..29ba937
and the case of memory
allocation error in option parsing.
Signed-off-by: Chengguang Xu
---
fs/9p/v9fs.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index e622f0f..29ba937 100644
--- a/fs/9p/v9fs.c
When specifying string type mount option several times
in a mount, current option parsing may cause memory leak.
Hence, call kfree for previous one in this case.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/exofs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs
When specifying string type mount option several times
in a mount, current option parsing may cause memory leak.
Hence, call kfree for previous one in this case.
Signed-off-by: Chengguang Xu
---
fs/exofs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/exofs/super.c b/fs/exofs
When specifying string type mount option (e.g., iocharset)
several times in a mount, current option parsing may
cause memory leak. Hence, call kfree for previous one
in this case. Meanwhile, check memory allocation result
for it.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs
When specifying string type mount option (e.g., iocharset)
several times in a mount, current option parsing may
cause memory leak. Hence, call kfree for previous one
in this case. Meanwhile, check memory allocation result
for it.
Signed-off-by: Chengguang Xu
---
fs/isofs/inode.c | 3 +++
1 file
Check memory allocation result for cachetag in mount option
parsing and fix potential memory leak in the error case.
Signed-off-by: Chengguang Xu <cgxu...@gmx.com>
---
fs/9p/v9fs.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 8fb89dd..e
Check memory allocation result for cachetag in mount option
parsing and fix potential memory leak in the error case.
Signed-off-by: Chengguang Xu
---
fs/9p/v9fs.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 8fb89dd..e622f0f 100644
--- a/fs/9p
it first and
check if the problem still persist.
The phenomenon I met is similar to yours in the previous email.
Thanks,
Chengguang.
-
Sent: Tuesday, March 20, 2018 at 3:22 PM
From: 王元良 <yuanliang@alibaba-inc.com>
To: "Chengguang Xu" <cgxu...@gmx.com>,
it first and
check if the problem still persist.
The phenomenon I met is similar to yours in the previous email.
Thanks,
Chengguang.
-
Sent: Tuesday, March 20, 2018 at 3:22 PM
From: 王元良
To: "Chengguang Xu" , "Chengguang Xu"
Cc: miklos , linux-unionfs ,
linux-kernel
Hi Yuanliang,
Can you try ext4 or xfs(with ftype=1) as underlying fs?
It seems the phenomenon that I met on xfs(with ftype=0) as underlying fs.
Thanks,
Chengguang.
> Sent: Tuesday, March 20, 2018 at 2:44 PM
> From: "Chengguang Xu" <cgxu...@gmx.com>
> To: 王元良 <y
Hi Yuanliang,
Can you try ext4 or xfs(with ftype=1) as underlying fs?
It seems the phenomenon that I met on xfs(with ftype=0) as underlying fs.
Thanks,
Chengguang.
> Sent: Tuesday, March 20, 2018 at 2:44 PM
> From: "Chengguang Xu"
> To: 王元良
> Cc: mik...@
Hi Yuanliang,
Can you explain how to reproduce it? and what filesystem do you use as
underlying fs?
> Sent: Tuesday, March 20, 2018 at 2:03 PM
> From: 王元良
> To: mik...@szeredi.hu
> Cc: linux-unio...@vger.kernel.org, linux-kernel@vger.kernel.org, 王元良
>
Hi Yuanliang,
Can you explain how to reproduce it? and what filesystem do you use as
underlying fs?
> Sent: Tuesday, March 20, 2018 at 2:03 PM
> From: 王元良
> To: mik...@szeredi.hu
> Cc: linux-unio...@vger.kernel.org, linux-kernel@vger.kernel.org, 王元良
>
> Subject: [PATCH] fs/overlayfs: Drop
When specifiying iocharset multiple times in a mount
or once/multiple in a remount, current option parsing
may cause inaccurate refcount of nls module.
Also, in the failure cleanup of option parsing,
the condition of calling unload_nls is not sufficient.
Signed-off-by: Chengguang Xu <c
When specifiying iocharset multiple times in a mount
or once/multiple in a remount, current option parsing
may cause inaccurate refcount of nls module.
Also, in the failure cleanup of option parsing,
the condition of calling unload_nls is not sufficient.
Signed-off-by: Chengguang Xu
---
Hi Jan
91 matches
Mail list logo