Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103758287
D20783.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20783.diff
View Options
Index: head/sys/kern/vfs_vnops.c
===================================================================
--- head/sys/kern/vfs_vnops.c
+++ head/sys/kern/vfs_vnops.c
@@ -1457,25 +1457,6 @@
return (0);
}
-/* generic FIOBMAP2 implementation */
-static int
-vn_ioc_bmap2(struct file *fp, struct fiobmap2_arg *arg, struct ucred *cred)
-{
- struct vnode *vp = fp->f_vnode;
- daddr_t lbn = arg->bn;
- int error;
-
- vn_lock(vp, LK_SHARED | LK_RETRY);
-#ifdef MAC
- error = mac_vnode_check_read(cred, fp->f_cred, vp);
- if (error == 0)
-#endif
- error = VOP_BMAP(vp, lbn, NULL, &arg->bn, &arg->runp,
- &arg->runb);
- VOP_UNLOCK(vp, 0);
- return (error);
-}
-
/*
* File table vnode ioctl routine.
*/
@@ -1485,6 +1466,7 @@
{
struct vattr vattr;
struct vnode *vp;
+ struct fiobmap2_arg *bmarg;
int error;
vp = fp->f_vnode;
@@ -1500,8 +1482,17 @@
*(int *)data = vattr.va_size - fp->f_offset;
return (error);
case FIOBMAP2:
- return (vn_ioc_bmap2(fp, (struct fiobmap2_arg*)data,
- active_cred));
+ bmarg = (struct fiobmap2_arg *)data;
+ vn_lock(vp, LK_SHARED | LK_RETRY);
+#ifdef MAC
+ error = mac_vnode_check_read(active_cred, fp->f_cred,
+ vp);
+ if (error == 0)
+#endif
+ error = VOP_BMAP(vp, bmarg->bn, NULL,
+ &bmarg->bn, &bmarg->runp, &bmarg->runb);
+ VOP_UNLOCK(vp, 0);
+ return (error);
case FIONBIO:
case FIOASYNC:
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 1:08 AM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14934340
Default Alt Text
D20783.diff (1 KB)
Attached To
Mode
D20783: style changes to FIOBMAP2
Attached
Detach File
Event Timeline
Log In to Comment