Now we don't use RCU to
protect files->max_fds. So using READ_ONCE() macro to read the value of
files->max_fds.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/compat.c | 6 +-
fs/file.c | 354 +++---
Convert select to use idr_get_tag_batch().
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/select.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index e211227..5d20a14 100644
--- a/fs/select.c
+++ b/fs/select.c
Replace close_on_exec with idr_(get,set,clear)_tag().
Through this patch, added new IDR tag FD_TAG_CLOEXEC
which is passing to idr_(get,set,clear)_tag() to
achieve close_on_exec functionality.
Also removed get_close_on_exec() and using close_on_exec() instead of that.
Signed-off-by: Sandhya
Use the IDR iteration functionality instead of the open_fds bitmap to
call filp_close() for each open file. Also make close_files() return
void, because it no longer uses the fdtable.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 37
Use idr_tag_get() in fd_is_open() to know whether a given fd is
allocated. Also move fd_is_open() to file.c and make it static
as it is only called from one place.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 7 ++-
include/linux/fdtable.h | 5
The IDR has removed the need to have full_fds_bits hence removing it.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 18 +-
include/linux/fdtable.h | 2 --
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/fs/file.c b/fs
The IDR is used in file descriptor allocation code to
allocate new file descriptor so, no need of next_fd to
track next file descriptor.
Hence removing it from file descriptor allocation code path.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 6
Instead of storing all the file pointers in a single array, use an
IDR. It is RCU-safe, and does not need to be reallocated when the
fd array grows. It also handles allocation of new file descriptors.
Signed-off-by: Sandhya Bankar
[mawil...@microsoft.com: fixes]
Signed-off-by: Matthew Wilcox
.
The performance benchmark needs to be run on this patchset.
Matthew Wilcox (5):
idr: Add ability to set/clear tags
idr: Add idr_for_each_entry_tagged()
idr, radix-tree: Add get_tag_batch function
idr, radix-tree: Implement copy_preload
vfs: Add init_task.h include
Sandhya Bankar (8
Now we don't use RCU to
protect files->max_fds. So using READ_ONCE() macro to read the value of
files->max_fds.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/compat.c | 6 +-
fs/file.c | 354 +++---
Convert select to use idr_get_tag_batch().
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/select.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index e211227..5d20a14 100644
--- a/fs/select.c
+++ b/fs/select.c
Removes a sparse warning about init_files() not being declared.
Signed-off-by: Matthew Wilcox
---
fs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/file.c b/fs/file.c
index 56c5731..23f198b 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -19,6 +19,7 @@
#include
#include
#include
+
Replace close_on_exec with idr_(get,set,clear)_tag().
Through this patch, added new IDR tag FD_TAG_CLOEXEC
which is passing to idr_(get,set,clear)_tag() to
achieve close_on_exec functionality.
Also removed get_close_on_exec() and using close_on_exec() instead of that.
Signed-off-by: Sandhya
Use the IDR iteration functionality instead of the open_fds bitmap to
call filp_close() for each open file. Also make close_files() return
void, because it no longer uses the fdtable.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 37
Use idr_tag_get() in fd_is_open() to know whether a given fd is
allocated. Also move fd_is_open() to file.c and make it static
as it is only called from one place.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 7 ++-
include/linux/fdtable.h | 5
The IDR is used in file descriptor allocation code to
allocate new file descriptor so, no need of next_fd to
track next file descriptor.
Hence removing it from file descriptor allocation code path.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 6
The IDR has removed the need to have full_fds_bits hence removing it.
Signed-off-by: Sandhya Bankar
Signed-off-by: Matthew Wilcox
---
fs/file.c | 18 +-
include/linux/fdtable.h | 2 --
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/fs/file.c b/fs
Instead of storing all the file pointers in a single array, use an
IDR. It is RCU-safe, and does not need to be reallocated when the
fd array grows. It also handles allocation of new file descriptors.
Signed-off-by: Sandhya Bankar
[mawil...@microsoft.com: fixes]
Signed-off-by: Matthew Wilcox
In the file descriptor table duplication code (called at fork()), we
need to duplicate an IDR. But we have to do it under a lock (so another
thread doesn't open/close a fd in the middle), and there's no suitable
preload operation for this today. Adding just idr_copy_preload() isn't
enough as anot
To implement select() on top of the IDR, we need to be able to get the
tags which represent the open files in bulk. For this user, it makes
sense to get a batch of BITS_PER_LONG tags at a time, and until another
user shows up that wants something different, let's enforce that instead
of coping wit
Add the ability to iterate over tagged entries in the IDR with
idr_get_next_tag() and idr_for_each_entry_tagged().
Signed-off-by: Matthew Wilcox
---
include/linux/idr.h | 15 ++-
lib/idr.c | 30 +-
tools/testing/ra
: Implement copy_preload
vfs: Add init_task.h include
Sandhya Bankar (8):
vfs: Replace array of file pointers with an IDR
vfs: Remove next_fd from fd alloc code path.
vfs: Remove full_fds_bits from fd allocation code path.
vfs: Use idr_tag_get() in fd_is_open().
vfs: Rewrite close_files
Use x instead of x != NULL .
This patch removes the explicit NULL comparisons.This issue is found by
checkpatch.pl script .
CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit"
Signed-off-by: Sandhya Bankar
---
drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
1 fi
Add space after that ','.
Signed-off-by: Sandhya Bankar
---
drivers/usb/musb/musbhsdma.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h
index f7b13fd2..46a2bb9 100644
--- a/drivers/usb/musb/musbhsd
Use sizeof(*qh)instead of sizeof *qh.
Signed-off-by: Sandhya Bankar
---
drivers/usb/musb/musb_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 2f8ad7f..72121fe 100644
--- a/drivers/usb/musb/musb_host.c
Use "foo *bar" instead of "foo * bar".
Signed-off-by: Sandhya Bankar
---
drivers/usb/image/microtek.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/image/microtek.h b/drivers/usb/image/microtek.h
index ccce318..7e32ae7 100644
---
Space required after that ','.
Signed-off-by: Sandhya Bankar
---
drivers/usb/phy/phy-omap-otg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
index c4bf2de..6f6d2a7 100644
--- a/drivers/usb/phy/phy-
Space prohibited before close parenthesis ')'.
Signed-off-by: Sandhya Bankar
---
drivers/usb/class/cdc-acm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 94a14f5..def5a54 100644
--- a/drivers/usb
Unnecessary [platform|pci]_set_drvdata() have been removed since the driver
core clears the driver data to NULLafter device release or on probe failure.
There is no need to manually clear the device driver data to NULL.
Signed-off-by: Sandhya Bankar
---
drivers/usb/gadget/udc/gr_udc.c | 1
Unnecessary [platform|pci]_set_drvdata() have been removed since the driver
core clears the driver data to NULLafter device release or on probe failure.
There is no need to manually clear the device driver data to NULL
Signed-off-by: Sandhya Bankar
---
drivers/usb/dwc3/dwc3-keystone.c | 1
Unnecessary [platform|pci]_set_drvdata() have been removed since the driver
core clears the driver data to NULLafter device release or on probe failure.
There is no need to manually clear the
device driver data to NULL.
Signed-off-by: Sandhya Bankar
---
drivers/usb/dwc2/pci.c | 1 -
1 file
Unnecessary [platform|pci]_set_drvdata() have been removed since the driver
core clears the driver datato NULL after device release or on probe failure.
There is no need to manually clear the device driver data to NULL.
Sandhya Bankar (3):
usb: pci: Remove unnecessary pci_set_drvdata().
usb
Remove space before ',' and '(' .
This patch is detected by checkpatch.pl
Signed-off-by: Sandhya Bankar
---
drivers/usb/wusbcore/crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/cry
Do not initialise statics to 0.
This patch is found by checkpatch.pl script.
Signed-off-by: Sandhya Bankar
---
drivers/usb/wusbcore/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c
index 8ed8e34..f7fc2371
Use (foo *) instead of (foo*).
Signed-off-by: Sandhya Bankar
---
drivers/usb/gadget/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index e6c0542..17a6077 100644
--- a/drivers/usb/gadget/config.c
+++ b
Remove unnecessary space before operator ','.
Signed-off-by: Sandhya Bankar
---
drivers/usb/phy/phy-twl6030-usb.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/phy/phy-twl6030-usb.c
b/drivers/usb/phy/phy-twl6030-usb.c
index 014dbbd7..24e2
Remove unnecessary space before open square bracket.
Signed-off-by: Sandhya Bankar
---
drivers/usb/isp1760/isp1760-if.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/isp1760/isp1760-if.c b/drivers/usb/isp1760/isp1760-if.c
index 264be4d..9535b28 100644
--- a
Remove unnecessary space before function pointer arguments.
Signed-off-by: Sandhya Bankar
---
drivers/usb/atm/ueagle-atm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 0186442..4333dc5 100644
--- a
38 matches
Mail list logo