Blob Blame History Raw
From 9e95bd4e3b2e64880a3522520b05d23cf29b3d91 Mon Sep 17 00:00:00 2001
From: Amar Tumballi <amarts@redhat.com>
Date: Mon, 10 Sep 2018 09:28:28 +0530
Subject: [PATCH 372/385] Revert "posix: disable block and character files"

This reverts commit d542543faf4eca04737ddfe215e8988a700caf42.

BUG: 1622649
Change-Id: Ib51b798df25ff606e6bdef72aba679a1d97f98d1
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/149666
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
 xlators/storage/posix/src/posix.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 5088469..e0165f8 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1453,23 +1453,6 @@ posix_mknod (call_frame_t *frame, xlator_t *this,
         }
 
 
-        if (((mode & S_IFMT) == S_IFBLK) || ((mode & S_IFMT) == S_IFCHR)) {
-                /* Man page 'man 2 mknod':
-                    EPERM  mode  requested  creation  of something other than
-                    a regular file, FIFO (named pipe), or UNIX domain socket,
-                    and the caller is not privileged (Linux: does not have the
-                    CAP_MKNOD capability); also returned  if  the  filesystem
-                    containing pathname does not support the type of node
-                    requested.
-                */
-                op_ret = -1;
-                op_errno = EPERM;
-                gf_msg (this->name, GF_LOG_ERROR, op_errno, P_MSG_MKNOD_FAILED,
-                        "%s: mknod failed as Block and Character devices "
-                        "are not supported on GlusterFS", real_path);
-                goto out;
-        }
-
         op_ret = posix_pstat (this, loc->pargfid, par_path, &preparent);
         if (op_ret == -1) {
                 op_errno = errno;
-- 
1.8.3.1