diff options
author | Martin Brandenburg <martin@omnibond.com> | 2016-02-20 20:22:40 +0100 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-24 23:07:50 +0100 |
commit | 47b4948fdb1055cd8d8f86aebb0b3fcb06ba36d5 (patch) | |
tree | 57fb61a4062793df3c85c405b57fd16448969279 /fs/orangefs/namei.c | |
parent | orangefs: don't d_drop in d_revalidate since the caller will (diff) | |
download | linux-47b4948fdb1055cd8d8f86aebb0b3fcb06ba36d5.tar.xz linux-47b4948fdb1055cd8d8f86aebb0b3fcb06ba36d5.zip |
orangefs: use ORANGEFS_NAME_LEN everywhere; remove ORANGEFS_NAME_MAX
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/namei.c')
-rw-r--r-- | fs/orangefs/namei.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index b3ae3749a932..f26f6694c48d 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -38,7 +38,7 @@ static int orangefs_create(struct inode *dir, ORANGEFS_TYPE_METAFILE, mode); strncpy(new_op->upcall.req.create.d_name, - dentry->d_name.name, ORANGEFS_NAME_LEN); + dentry->d_name.name, ORANGEFS_NAME_MAX); ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); @@ -116,7 +116,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %s\n", __func__, dentry->d_name.name); - if (dentry->d_name.len > (ORANGEFS_NAME_LEN - 1)) + if (dentry->d_name.len > (ORANGEFS_NAME_MAX - 1)) return ERR_PTR(-ENAMETOOLONG); new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP); @@ -133,7 +133,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, new_op->upcall.req.lookup.parent_refn = parent->refn; strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, - ORANGEFS_NAME_LEN); + ORANGEFS_NAME_MAX); gossip_debug(GOSSIP_NAME_DEBUG, "%s: doing lookup on %s under %pU,%d (follow=%s)\n", @@ -234,7 +234,7 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry) new_op->upcall.req.remove.parent_refn = parent->refn; strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, - ORANGEFS_NAME_LEN); + ORANGEFS_NAME_MAX); ret = service_operation(new_op, "orangefs_unlink", get_interruptible_flag(inode)); @@ -283,8 +283,8 @@ static int orangefs_symlink(struct inode *dir, strncpy(new_op->upcall.req.sym.entry_name, dentry->d_name.name, - ORANGEFS_NAME_LEN); - strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_LEN); + ORANGEFS_NAME_MAX); + strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX); ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); @@ -347,7 +347,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode ORANGEFS_TYPE_DIRECTORY, mode); strncpy(new_op->upcall.req.mkdir.d_name, - dentry->d_name.name, ORANGEFS_NAME_LEN); + dentry->d_name.name, ORANGEFS_NAME_MAX); ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); @@ -420,10 +420,10 @@ static int orangefs_rename(struct inode *old_dir, strncpy(new_op->upcall.req.rename.d_old_name, old_dentry->d_name.name, - ORANGEFS_NAME_LEN); + ORANGEFS_NAME_MAX); strncpy(new_op->upcall.req.rename.d_new_name, new_dentry->d_name.name, - ORANGEFS_NAME_LEN); + ORANGEFS_NAME_MAX); ret = service_operation(new_op, "orangefs_rename", |