Its only caller evict() has promised a non-NULL inode->i_bdev.
Signed-off-by: Yan Hong
---
fs/block_dev.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 38e721b..9bdbd9b 100644
--- a/fs/block_dev.c
+++ b/fs/block_de
The parameter 'wb' is never used in this function.
Cc: Wu Fengguang
Signed-off-by: Yan Hong
---
fs/fs-writeback.c |7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index be3efc4..da746e8 100644
--- a/fs/fs-writeback.
inode->i_private is promised to be NULL on allocation, no need to set
it explicitly.
Signed-off-by: Yan Hong
---
fs/debugfs/inode.c |1 -
1 file changed, 1 deletion(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 4733eab..de2698d 100644
--- a/fs/debugfs/inode.c
+++ b
.
total: 0 errors, 0 warnings, 25 lines checked
.patch has no obvious style problems and is ready for submission.
Also leave two blank lines after the error message if check fails.
Signed-off-by: Yan Hong
---
scripts/checkpatch.pl |6 --
1 file changed, 4 insertions(+), 2 deletions
Pass NULL instead of empty string to debugfs_print_regs32() when
prefix is not used, according to the intention of the code.
Signed-off-by: Yan Hong
---
drivers/usb/dwc3/debugfs.c |2 +-
fs/debugfs/file.c |3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a
debug_fill_super():
return directly if failed to allocate debugfs_fs_info.
__create_file():
remove redundant initialization.
__debugfs_remove():
remove redundant check.
debugfs_positive() already checked dentry->inode is not NULL.
Signed-off-by: Yan Hong
---
Signed-off-by: Yan Hong
---
fs/debugfs/file.c | 42 --
fs/debugfs/inode.c | 10 ++
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 3915cc9..b37eee1 100644
--- a/fs/debugfs/file.c
If 'prefix' is not used, pass NULL instead of empty string as the
last parameter of debugfs_print_regs32().
Cc: Alessandro Rubini
Signed-off-by: Yan Hong
---
This function is only used (twice) by the author of it, and the
'prefix' feature is never used. But it's a we
'dentry' has been set to NULL at the beginning of the function.
Signed-off-by: Yan Hong
---
fs/debugfs/inode.c |1 -
1 file changed, 1 deletion(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 11f6514..12f1282 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
Simple code clean to remove goto.
Signed-off-by: Yan Hong
---
fs/debugfs/inode.c |5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 58eadc1..c0b06a3 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -221,12 +221,11
debugfs_positive() already checked dentry->d_inode is
not NUUL, no need to check it again.
Signed-off-by: Yan Hong
---
fs/debugfs/inode.c | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 12f1
If kzalloc failed, memory is not allocated, sb->s_fs_info is NULL.
No need to go through clean up code, return -ENOMEM directly.
Signed-off-by: Yan Hong
---
fs/debugfs/inode.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inod
2012/10/27 Greg KH :
> On Sat, Oct 27, 2012 at 04:05:29PM +0800, Yan Hong wrote:
>> Simple code clean to remove goto.
>
> There is nothing wrong with gotos on error paths, so this one should
> stay.
>
> greg k-h
I thought we use goto on error path because there is no othe
Signed-off-by: Yan Hong
---
fs/fs-writeback.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 51ea267..e9e619a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1032,7 +1032,7 @@ int bdi_writeback_thread(void *data
It makes no sense to inlines exported function.
Signed-off-by: Yan Hong
---
init_buffer() is trivial and only get two module users. Maybe we
can move it to buffer_head.h.
Remove inline is much more simple to make it clean though.
fs/buffer.c |3 +--
1 file changed, 1 insertion(+), 2
buffer_head comes from kmem_cache_zalloc(), no need to zero
its field.
Signed-off-by: Yan Hong
---
init_buffer() can be actually removed too, but I'm afraid someday its
semantic will beyond initializing ->b_end_io and ->b_private.
fs/buffer.c |3 ---
1 file changed, 3 deletio
Yan Hong (8):
fs/namespace.c: introduce helper function path_unmounted()
fs/namespace.c: remove unused macro MNT_WRITER_UNDERFLOW_LIMIT
fs/namespace.c: trivial code clean
fs/namespace.c: check permission early in sys_[u]mount
fs/namei.c: introduce macro AT_FDINV
fs/inode.c: call
In fs/namespace.c, we verify whether a path is a mountpoint by
comparing path->dentry and path->mnt->mnt_root. Introduce
path_unmounted() to make code more readable.
Signed-off-by: Yan Hong
---
fs/namespace.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions
Signed-off-by: Yan Hong
---
fs/namespace.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index dd969f8..bbe9014 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -763,7 +763,7 @@ vfs_kern_mount(struct file_system_type *type, int
Its users have gone.
Signed-off-by: Yan Hong
---
fs/namespace.c |1 -
1 file changed, 1 deletion(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 3fdc239..dd969f8 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -59,7 +59,6 @@ static inline unsigned long hash(struct vfsmount *mnt
We have several branches in sys_mount, each of them will check
CAP_SYS_ADMIN capability seperately. Do this check at the beginning
of sys_mount.
Also check permission as early as possible in sys_umount.
Signed-off-by: Yan Hong
---
fs/namespace.c | 26 +++---
1 file
File descriptor is irrelevent when LOOKUP_ROOT is set.
Introduce AT_FDINV to avoid using hard coded value or reusing
existing macro.
Signed-off-by: Yan Hong
---
fs/namei.c| 11 ++-
include/linux/fcntl.h |2 ++
2 files changed, 8 insertions(+), 5 deletions(-)
diff
This saves us a list head initialization.
Signed-off-by: Yan Hong
---
fs/inode.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index ac8d904..3a2cd41 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -921,9 +921,11 @@ struct inode *new_inode
Do we have particular reason to do this here?
Signed-off-by: Yan Hong
---
fs/inode.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 3a2cd41..e89d30c 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -14,7 +14,6 @@
#include
#include
#include
-#include
Mostly fix comments which reference inexist locks or parameters.
Signed-off-by: Yan Hong
---
fs/dcache.c| 12
fs/inode.c |4 ++--
fs/namei.c |2 +-
fs/namespace.c |9 +++--
4 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/fs/dcache.c b
25 matches
Mail list logo