aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-09 03:00:52 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 03:00:52 -0400
commit67fcaa73adafb19139a7cd8ab133592b6a0a0901 (patch)
tree6e7b83e7c8b0a1d8b4776af1537d6f07ebe9435d /fs/xfs/xfs_attr.c
parentb83bd1388133e914c38bd31d69bc90143e6ab10c (diff)
[XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters.
SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26107a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r--fs/xfs/xfs_attr.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 3ef41e75d08a..4dcef8d1c32f 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -2324,56 +2324,56 @@ xfs_attr_trace_enter(int type, char *where,
2324 2324
2325STATIC int 2325STATIC int
2326posix_acl_access_set( 2326posix_acl_access_set(
2327 vnode_t *vp, char *name, void *data, size_t size, int xflags) 2327 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2328{ 2328{
2329 return xfs_acl_vset(vp, data, size, _ACL_TYPE_ACCESS); 2329 return xfs_acl_vset(vp, data, size, _ACL_TYPE_ACCESS);
2330} 2330}
2331 2331
2332STATIC int 2332STATIC int
2333posix_acl_access_remove( 2333posix_acl_access_remove(
2334 struct vnode *vp, char *name, int xflags) 2334 bhv_vnode_t *vp, char *name, int xflags)
2335{ 2335{
2336 return xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); 2336 return xfs_acl_vremove(vp, _ACL_TYPE_ACCESS);
2337} 2337}
2338 2338
2339STATIC int 2339STATIC int
2340posix_acl_access_get( 2340posix_acl_access_get(
2341 vnode_t *vp, char *name, void *data, size_t size, int xflags) 2341 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2342{ 2342{
2343 return xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS); 2343 return xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS);
2344} 2344}
2345 2345
2346STATIC int 2346STATIC int
2347posix_acl_access_exists( 2347posix_acl_access_exists(
2348 vnode_t *vp) 2348 bhv_vnode_t *vp)
2349{ 2349{
2350 return xfs_acl_vhasacl_access(vp); 2350 return xfs_acl_vhasacl_access(vp);
2351} 2351}
2352 2352
2353STATIC int 2353STATIC int
2354posix_acl_default_set( 2354posix_acl_default_set(
2355 vnode_t *vp, char *name, void *data, size_t size, int xflags) 2355 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2356{ 2356{
2357 return xfs_acl_vset(vp, data, size, _ACL_TYPE_DEFAULT); 2357 return xfs_acl_vset(vp, data, size, _ACL_TYPE_DEFAULT);
2358} 2358}
2359 2359
2360STATIC int 2360STATIC int
2361posix_acl_default_get( 2361posix_acl_default_get(
2362 vnode_t *vp, char *name, void *data, size_t size, int xflags) 2362 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2363{ 2363{
2364 return xfs_acl_vget(vp, data, size, _ACL_TYPE_DEFAULT); 2364 return xfs_acl_vget(vp, data, size, _ACL_TYPE_DEFAULT);
2365} 2365}
2366 2366
2367STATIC int 2367STATIC int
2368posix_acl_default_remove( 2368posix_acl_default_remove(
2369 struct vnode *vp, char *name, int xflags) 2369 bhv_vnode_t *vp, char *name, int xflags)
2370{ 2370{
2371 return xfs_acl_vremove(vp, _ACL_TYPE_DEFAULT); 2371 return xfs_acl_vremove(vp, _ACL_TYPE_DEFAULT);
2372} 2372}
2373 2373
2374STATIC int 2374STATIC int
2375posix_acl_default_exists( 2375posix_acl_default_exists(
2376 vnode_t *vp) 2376 bhv_vnode_t *vp)
2377{ 2377{
2378 return xfs_acl_vhasacl_default(vp); 2378 return xfs_acl_vhasacl_default(vp);
2379} 2379}
@@ -2406,21 +2406,18 @@ STATIC struct attrnames *attr_system_names[] =
2406 2406
2407STATIC int 2407STATIC int
2408attr_generic_set( 2408attr_generic_set(
2409 struct vnode *vp, char *name, void *data, size_t size, int xflags) 2409 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2410{ 2410{
2411 int error; 2411 return -bhv_vop_attr_set(vp, name, data, size, xflags, NULL);
2412
2413 VOP_ATTR_SET(vp, name, data, size, xflags, NULL, error);
2414 return -error;
2415} 2412}
2416 2413
2417STATIC int 2414STATIC int
2418attr_generic_get( 2415attr_generic_get(
2419 struct vnode *vp, char *name, void *data, size_t size, int xflags) 2416 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2420{ 2417{
2421 int error, asize = size; 2418 int error, asize = size;
2422 2419
2423 VOP_ATTR_GET(vp, name, data, &asize, xflags, NULL, error); 2420 error = bhv_vop_attr_get(vp, name, data, &asize, xflags, NULL);
2424 if (!error) 2421 if (!error)
2425 return asize; 2422 return asize;
2426 return -error; 2423 return -error;
@@ -2428,12 +2425,9 @@ attr_generic_get(
2428 2425
2429STATIC int 2426STATIC int
2430attr_generic_remove( 2427attr_generic_remove(
2431 struct vnode *vp, char *name, int xflags) 2428 bhv_vnode_t *vp, char *name, int xflags)
2432{ 2429{
2433 int error; 2430 return -bhv_vop_attr_remove(vp, name, xflags, NULL);
2434
2435 VOP_ATTR_REMOVE(vp, name, xflags, NULL, error);
2436 return -error;
2437} 2431}
2438 2432
2439STATIC int 2433STATIC int
@@ -2461,7 +2455,7 @@ attr_generic_listadd(
2461 2455
2462STATIC int 2456STATIC int
2463attr_system_list( 2457attr_system_list(
2464 struct vnode *vp, 2458 bhv_vnode_t *vp,
2465 void *data, 2459 void *data,
2466 size_t size, 2460 size_t size,
2467 ssize_t *result) 2461 ssize_t *result)
@@ -2483,12 +2477,12 @@ attr_system_list(
2483 2477
2484int 2478int
2485attr_generic_list( 2479attr_generic_list(
2486 struct vnode *vp, void *data, size_t size, int xflags, ssize_t *result) 2480 bhv_vnode_t *vp, void *data, size_t size, int xflags, ssize_t *result)
2487{ 2481{
2488 attrlist_cursor_kern_t cursor = { 0 }; 2482 attrlist_cursor_kern_t cursor = { 0 };
2489 int error; 2483 int error;
2490 2484
2491 VOP_ATTR_LIST(vp, data, size, xflags, &cursor, NULL, error); 2485 error = bhv_vop_attr_list(vp, data, size, xflags, &cursor, NULL);
2492 if (error > 0) 2486 if (error > 0)
2493 return -error; 2487 return -error;
2494 *result = -error; 2488 *result = -error;
@@ -2516,7 +2510,7 @@ attr_lookup_namespace(
2516 */ 2510 */
2517STATIC int 2511STATIC int
2518attr_user_capable( 2512attr_user_capable(
2519 struct vnode *vp, 2513 bhv_vnode_t *vp,
2520 cred_t *cred) 2514 cred_t *cred)
2521{ 2515{
2522 struct inode *inode = vn_to_inode(vp); 2516 struct inode *inode = vn_to_inode(vp);
@@ -2534,7 +2528,7 @@ attr_user_capable(
2534 2528
2535STATIC int 2529STATIC int
2536attr_trusted_capable( 2530attr_trusted_capable(
2537 struct vnode *vp, 2531 bhv_vnode_t *vp,
2538 cred_t *cred) 2532 cred_t *cred)
2539{ 2533{
2540 struct inode *inode = vn_to_inode(vp); 2534 struct inode *inode = vn_to_inode(vp);
@@ -2548,7 +2542,7 @@ attr_trusted_capable(
2548 2542
2549STATIC int 2543STATIC int
2550attr_secure_capable( 2544attr_secure_capable(
2551 struct vnode *vp, 2545 bhv_vnode_t *vp,
2552 cred_t *cred) 2546 cred_t *cred)
2553{ 2547{
2554 return -ENOSECURITY; 2548 return -ENOSECURITY;
@@ -2556,7 +2550,7 @@ attr_secure_capable(
2556 2550
2557STATIC int 2551STATIC int
2558attr_system_set( 2552attr_system_set(
2559 struct vnode *vp, char *name, void *data, size_t size, int xflags) 2553 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2560{ 2554{
2561 attrnames_t *namesp; 2555 attrnames_t *namesp;
2562 int error; 2556 int error;
@@ -2575,7 +2569,7 @@ attr_system_set(
2575 2569
2576STATIC int 2570STATIC int
2577attr_system_get( 2571attr_system_get(
2578 struct vnode *vp, char *name, void *data, size_t size, int xflags) 2572 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2579{ 2573{
2580 attrnames_t *namesp; 2574 attrnames_t *namesp;
2581 2575
@@ -2587,7 +2581,7 @@ attr_system_get(
2587 2581
2588STATIC int 2582STATIC int
2589attr_system_remove( 2583attr_system_remove(
2590 struct vnode *vp, char *name, int xflags) 2584 bhv_vnode_t *vp, char *name, int xflags)
2591{ 2585{
2592 attrnames_t *namesp; 2586 attrnames_t *namesp;
2593 2587