diff options
author | David Howells <dhowells@redhat.com> | 2017-07-04 12:25:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-07-06 03:27:09 -0400 |
commit | cdf01226b26e98c79c13b335fbe0cbbbe850cf44 (patch) | |
tree | 979318b9a3b69b03b39f6e66d3ffa75b82565ddc /fs/gfs2/dir.c | |
parent | ee416bcdba9975065de571e09de1f7ebfde2156a (diff) |
VFS: Provide empty name qstr
Provide an empty name (ie. "") qstr for general use.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 79113219be5f..a5dfff6a033e 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -872,7 +872,6 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, | |||
872 | struct buffer_head *bh; | 872 | struct buffer_head *bh; |
873 | struct gfs2_leaf *leaf; | 873 | struct gfs2_leaf *leaf; |
874 | struct gfs2_dirent *dent; | 874 | struct gfs2_dirent *dent; |
875 | struct qstr name = { .name = "" }; | ||
876 | struct timespec tv = current_time(inode); | 875 | struct timespec tv = current_time(inode); |
877 | 876 | ||
878 | error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL); | 877 | error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL); |
@@ -896,7 +895,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, | |||
896 | leaf->lf_sec = cpu_to_be64(tv.tv_sec); | 895 | leaf->lf_sec = cpu_to_be64(tv.tv_sec); |
897 | memset(leaf->lf_reserved2, 0, sizeof(leaf->lf_reserved2)); | 896 | memset(leaf->lf_reserved2, 0, sizeof(leaf->lf_reserved2)); |
898 | dent = (struct gfs2_dirent *)(leaf+1); | 897 | dent = (struct gfs2_dirent *)(leaf+1); |
899 | gfs2_qstr2dirent(&name, bh->b_size - sizeof(struct gfs2_leaf), dent); | 898 | gfs2_qstr2dirent(&empty_name, bh->b_size - sizeof(struct gfs2_leaf), dent); |
900 | *pbh = bh; | 899 | *pbh = bh; |
901 | return leaf; | 900 | return leaf; |
902 | } | 901 | } |