diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 14:48:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:25 -0400 |
commit | cb0942b81249798e15c3f04eee2946ef543e8115 (patch) | |
tree | 7d494c580a847342577661782c5173f76178aa81 /fs | |
parent | cecb46f194460d23cacf3b13593f9f5a4f7a0fed (diff) |
make get_file() return its argument
simplifies a bunch of callers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/autofs4/waitq.c | 3 | ||||
-rw-r--r-- | fs/fuse/dev.c | 3 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 3 | ||||
-rw-r--r-- | fs/proc/base.c | 3 | ||||
-rw-r--r-- | fs/select.c | 3 |
5 files changed, 5 insertions, 10 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index da8876d38a7b..dce436e595c1 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -175,8 +175,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, | |||
175 | return; | 175 | return; |
176 | } | 176 | } |
177 | 177 | ||
178 | pipe = sbi->pipe; | 178 | pipe = get_file(sbi->pipe); |
179 | get_file(pipe); | ||
180 | 179 | ||
181 | mutex_unlock(&sbi->wq_mutex); | 180 | mutex_unlock(&sbi->wq_mutex); |
182 | 181 | ||
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index f4246cfc8d87..8c23fa7a91e6 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -148,8 +148,7 @@ static struct fuse_req *get_reserved_req(struct fuse_conn *fc, | |||
148 | if (ff->reserved_req) { | 148 | if (ff->reserved_req) { |
149 | req = ff->reserved_req; | 149 | req = ff->reserved_req; |
150 | ff->reserved_req = NULL; | 150 | ff->reserved_req = NULL; |
151 | get_file(file); | 151 | req->stolen_file = get_file(file); |
152 | req->stolen_file = file; | ||
153 | } | 152 | } |
154 | spin_unlock(&fc->lock); | 153 | spin_unlock(&fc->lock); |
155 | } while (!req); | 154 | } while (!req); |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index cc894eda385a..48a1bad37334 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2837,8 +2837,7 @@ static int nfs4_setlease(struct nfs4_delegation *dp, int flag) | |||
2837 | return -ENOMEM; | 2837 | return -ENOMEM; |
2838 | } | 2838 | } |
2839 | fp->fi_lease = fl; | 2839 | fp->fi_lease = fl; |
2840 | fp->fi_deleg_file = fl->fl_file; | 2840 | fp->fi_deleg_file = get_file(fl->fl_file); |
2841 | get_file(fp->fi_deleg_file); | ||
2842 | atomic_set(&fp->fi_delegees, 1); | 2841 | atomic_set(&fp->fi_delegees, 1); |
2843 | list_add(&dp->dl_perfile, &fp->fi_delegations); | 2842 | list_add(&dp->dl_perfile, &fp->fi_delegations); |
2844 | return 0; | 2843 | return 0; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index b55c3bb298e3..f1e8438d21b5 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1979,8 +1979,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
1979 | if (++pos <= filp->f_pos) | 1979 | if (++pos <= filp->f_pos) |
1980 | continue; | 1980 | continue; |
1981 | 1981 | ||
1982 | get_file(vma->vm_file); | 1982 | info.file = get_file(vma->vm_file); |
1983 | info.file = vma->vm_file; | ||
1984 | info.len = snprintf(info.name, | 1983 | info.len = snprintf(info.name, |
1985 | sizeof(info.name), "%lx-%lx", | 1984 | sizeof(info.name), "%lx-%lx", |
1986 | vma->vm_start, vma->vm_end); | 1985 | vma->vm_start, vma->vm_end); |
diff --git a/fs/select.c b/fs/select.c index db14c781335e..ffdd16d6e691 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -220,8 +220,7 @@ static void __pollwait(struct file *filp, wait_queue_head_t *wait_address, | |||
220 | struct poll_table_entry *entry = poll_get_entry(pwq); | 220 | struct poll_table_entry *entry = poll_get_entry(pwq); |
221 | if (!entry) | 221 | if (!entry) |
222 | return; | 222 | return; |
223 | get_file(filp); | 223 | entry->filp = get_file(filp); |
224 | entry->filp = filp; | ||
225 | entry->wait_address = wait_address; | 224 | entry->wait_address = wait_address; |
226 | entry->key = p->_key; | 225 | entry->key = p->_key; |
227 | init_waitqueue_func_entry(&entry->wait, pollwake); | 226 | init_waitqueue_func_entry(&entry->wait, pollwake); |