aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/util.c')
-rw-r--r--fs/gfs2/util.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c
index 74e2c62f2370..ad49153c33d1 100644
--- a/fs/gfs2/util.c
+++ b/fs/gfs2/util.c
@@ -221,36 +221,6 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
221 return rv; 221 return rv;
222} 222}
223 223
224/**
225 * gfs2_add_bh_to_ub - copy a buffer up to user space
226 * @ub: the structure representing where to copy
227 * @bh: the buffer
228 *
229 * Returns: errno
230 */
231
232int gfs2_add_bh_to_ub(struct gfs2_user_buffer *ub, struct buffer_head *bh)
233{
234 uint64_t blkno = bh->b_blocknr;
235
236 if (ub->ub_count + sizeof(uint64_t) + bh->b_size > ub->ub_size)
237 return -ENOMEM;
238
239 if (copy_to_user(ub->ub_data + ub->ub_count,
240 &blkno,
241 sizeof(uint64_t)))
242 return -EFAULT;
243 ub->ub_count += sizeof(uint64_t);
244
245 if (copy_to_user(ub->ub_data + ub->ub_count,
246 bh->b_data,
247 bh->b_size))
248 return -EFAULT;
249 ub->ub_count += bh->b_size;
250
251 return 0;
252}
253
254void gfs2_icbit_munge(struct gfs2_sbd *sdp, unsigned char **bitmap, 224void gfs2_icbit_munge(struct gfs2_sbd *sdp, unsigned char **bitmap,
255 unsigned int bit, int new_value) 225 unsigned int bit, int new_value)
256{ 226{