diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index fd4362063f25..c70c4e3db790 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/compat.h> | 18 | #include <linux/compat.h> |
19 | #include <linux/ioctl.h> | 19 | #include <linux/ioctl.h> |
20 | #include <linux/mount.h> | ||
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
21 | #include "xfs.h" | 22 | #include "xfs.h" |
22 | #include "xfs_fs.h" | 23 | #include "xfs_fs.h" |
@@ -458,15 +459,23 @@ xfs_compat_attrmulti_by_handle( | |||
458 | &ops[i].am_length, ops[i].am_flags); | 459 | &ops[i].am_length, ops[i].am_flags); |
459 | break; | 460 | break; |
460 | case ATTR_OP_SET: | 461 | case ATTR_OP_SET: |
462 | ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); | ||
463 | if (ops[i].am_error) | ||
464 | break; | ||
461 | ops[i].am_error = xfs_attrmulti_attr_set( | 465 | ops[i].am_error = xfs_attrmulti_attr_set( |
462 | dentry->d_inode, attr_name, | 466 | dentry->d_inode, attr_name, |
463 | compat_ptr(ops[i].am_attrvalue), | 467 | compat_ptr(ops[i].am_attrvalue), |
464 | ops[i].am_length, ops[i].am_flags); | 468 | ops[i].am_length, ops[i].am_flags); |
469 | mnt_drop_write(parfilp->f_path.mnt); | ||
465 | break; | 470 | break; |
466 | case ATTR_OP_REMOVE: | 471 | case ATTR_OP_REMOVE: |
472 | ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); | ||
473 | if (ops[i].am_error) | ||
474 | break; | ||
467 | ops[i].am_error = xfs_attrmulti_attr_remove( | 475 | ops[i].am_error = xfs_attrmulti_attr_remove( |
468 | dentry->d_inode, attr_name, | 476 | dentry->d_inode, attr_name, |
469 | ops[i].am_flags); | 477 | ops[i].am_flags); |
478 | mnt_drop_write(parfilp->f_path.mnt); | ||
470 | break; | 479 | break; |
471 | default: | 480 | default: |
472 | ops[i].am_error = EINVAL; | 481 | ops[i].am_error = EINVAL; |