diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-28 12:52:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 22:20:08 -0400 |
commit | 2903ff019b346ab8d36ebbf54853c3aaf6590608 (patch) | |
tree | 962d94054765bb37bc00e977c3036e65c5fd91fe /fs/coda | |
parent | a5b470ba06aa3f96999ede5feba178df6bdb134a (diff) |
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/inode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index bd2313d106e5..d315c6c5891a 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -107,9 +107,9 @@ static const struct super_operations coda_super_operations = | |||
107 | 107 | ||
108 | static int get_device_index(struct coda_mount_data *data) | 108 | static int get_device_index(struct coda_mount_data *data) |
109 | { | 109 | { |
110 | struct file *file; | 110 | struct fd f; |
111 | struct inode *inode; | 111 | struct inode *inode; |
112 | int idx, fput_needed; | 112 | int idx; |
113 | 113 | ||
114 | if (data == NULL) { | 114 | if (data == NULL) { |
115 | printk("coda_read_super: Bad mount data\n"); | 115 | printk("coda_read_super: Bad mount data\n"); |
@@ -121,17 +121,17 @@ static int get_device_index(struct coda_mount_data *data) | |||
121 | return -1; | 121 | return -1; |
122 | } | 122 | } |
123 | 123 | ||
124 | file = fget_light(data->fd, &fput_needed); | 124 | f = fdget(data->fd); |
125 | if (!file) | 125 | if (!f.file) |
126 | goto Ebadf; | 126 | goto Ebadf; |
127 | inode = file->f_path.dentry->d_inode; | 127 | inode = f.file->f_path.dentry->d_inode; |
128 | if (!S_ISCHR(inode->i_mode) || imajor(inode) != CODA_PSDEV_MAJOR) { | 128 | if (!S_ISCHR(inode->i_mode) || imajor(inode) != CODA_PSDEV_MAJOR) { |
129 | fput_light(file, fput_needed); | 129 | fdput(f); |
130 | goto Ebadf; | 130 | goto Ebadf; |
131 | } | 131 | } |
132 | 132 | ||
133 | idx = iminor(inode); | 133 | idx = iminor(inode); |
134 | fput_light(file, fput_needed); | 134 | fdput(f); |
135 | 135 | ||
136 | if (idx < 0 || idx >= MAX_CODADEVS) { | 136 | if (idx < 0 || idx >= MAX_CODADEVS) { |
137 | printk("coda_read_super: Bad minor number\n"); | 137 | printk("coda_read_super: Bad minor number\n"); |