diff --git a/fs/file.c b/fs/file.c index 35115f8d28e7866a8a1826f80ba0cf471cc0d54c..cf236025e7984ee53175cea67e041353b8c7018d 100644 --- a/fs/file.c +++ b/fs/file.c @@ -302,10 +302,9 @@ static unsigned int sane_fdtable_size(struct fdtable *fdt, unsigned int max_fds) unsigned int count; count = count_open_files(fdt); - max_fds = ALIGN(max_fds, BITS_PER_LONG); if (max_fds < NR_OPEN_DEFAULT) max_fds = NR_OPEN_DEFAULT; - return min(count, max_fds); + return ALIGN(min(count, max_fds), BITS_PER_LONG); } /*