aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fcntl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r--fs/fcntl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c
index e4f26165f12a..8e382a5d51bd 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -77,10 +77,9 @@ repeat:
77 start = files->next_fd; 77 start = files->next_fd;
78 78
79 newfd = start; 79 newfd = start;
80 if (start < fdt->max_fdset) { 80 if (start < fdt->max_fds)
81 newfd = find_next_zero_bit(fdt->open_fds->fds_bits, 81 newfd = find_next_zero_bit(fdt->open_fds->fds_bits,
82 fdt->max_fdset, start); 82 fdt->max_fds, start);
83 }
84 83
85 error = -EMFILE; 84 error = -EMFILE;
86 if (newfd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur) 85 if (newfd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
@@ -204,7 +203,7 @@ asmlinkage long sys_dup(unsigned int fildes)
204 203
205static int setfl(int fd, struct file * filp, unsigned long arg) 204static int setfl(int fd, struct file * filp, unsigned long arg)
206{ 205{
207 struct inode * inode = filp->f_dentry->d_inode; 206 struct inode * inode = filp->f_path.dentry->d_inode;
208 int error = 0; 207 int error = 0;
209 208
210 /* 209 /*
@@ -553,7 +552,7 @@ int send_sigurg(struct fown_struct *fown)
553} 552}
554 553
555static DEFINE_RWLOCK(fasync_lock); 554static DEFINE_RWLOCK(fasync_lock);
556static kmem_cache_t *fasync_cache __read_mostly; 555static struct kmem_cache *fasync_cache __read_mostly;
557 556
558/* 557/*
559 * fasync_helper() is used by some character device drivers (mainly mice) 558 * fasync_helper() is used by some character device drivers (mainly mice)
@@ -567,7 +566,7 @@ int fasync_helper(int fd, struct file * filp, int on, struct fasync_struct **fap
567 int result = 0; 566 int result = 0;
568 567
569 if (on) { 568 if (on) {
570 new = kmem_cache_alloc(fasync_cache, SLAB_KERNEL); 569 new = kmem_cache_alloc(fasync_cache, GFP_KERNEL);
571 if (!new) 570 if (!new)
572 return -ENOMEM; 571 return -ENOMEM;
573 } 572 }