git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches
[sfrench/cifs-2.6.git]
/
fs
/
btrfs
/
ioctl.c
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index ba62dc3d59ec04f84981dd27de38df6614351af0..47c1b96df0991c5c3b36d9f28a859c5398b7ba24 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-105,9
+105,10
@@
static unsigned int btrfs_mask_fsflags_for_type(struct inode *inode,
}
/*
}
/*
- * Export inode flags to the format expected by the FS_IOC_GETFLAGS ioctl.
+ * Export internal inode flags to the format expected by the FS_IOC_GETFLAGS
+ * ioctl.
*/
*/
-static unsigned int btrfs_
flags_to_ioctl
(unsigned int flags)
+static unsigned int btrfs_
inode_flags_to_fsflags
(unsigned int flags)
{
unsigned int iflags = 0;
{
unsigned int iflags = 0;
@@
-161,7
+162,7
@@
void btrfs_sync_inode_flags_to_i_flags(struct inode *inode)
static int btrfs_ioctl_getflags(struct file *file, void __user *arg)
{
struct btrfs_inode *ip = BTRFS_I(file_inode(file));
static int btrfs_ioctl_getflags(struct file *file, void __user *arg)
{
struct btrfs_inode *ip = BTRFS_I(file_inode(file));
- unsigned int flags = btrfs_
flags_to_ioctl
(ip->flags);
+ unsigned int flags = btrfs_
inode_flags_to_fsflags
(ip->flags);
if (copy_to_user(arg, &flags, sizeof(flags)))
return -EFAULT;
if (copy_to_user(arg, &flags, sizeof(flags)))
return -EFAULT;
@@
-221,7
+222,7
@@
static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
mode = inode->i_mode;
flags = btrfs_mask_fsflags_for_type(inode, flags);
mode = inode->i_mode;
flags = btrfs_mask_fsflags_for_type(inode, flags);
- oldflags = btrfs_
flags_to_ioctl
(ip->flags);
+ oldflags = btrfs_
inode_flags_to_fsflags
(ip->flags);
if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) {
if (!capable(CAP_LINUX_IMMUTABLE)) {
ret = -EPERM;
if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) {
if (!capable(CAP_LINUX_IMMUTABLE)) {
ret = -EPERM;